How to write a unicode text in pdf file

Dear Friends,
I am a beginner in acrobat pdf plug-in development. I was trying to write a unicode text (Tamil text) into pdf file.
Using same api I am able to write english text in time-roman, areal etc fonts. But I am not able to write tamil texts.
The code is as below:
        memset(&pdeFontAttrs, 0, sizeof(pdeFontAttrs));
        pdeFontAttrs.name = ASAtomFromString("Latha");
        pdeFontAttrs.type = ASAtomFromString("TrueType");
        pdeFont    = PDEFontCreateFromSysFont(                                        \
                        PDFindSysFont(&pdeFontAttrs, sizeof(pdeFontAttrs), 0),    \
                        kPDEFontCreateEmbedded);
        pdeText = PDETextCreate();
        PDETextAdd(pdeText, kPDETextRun, 0, (ASUInt8 *)buffer, _tcslen(buffer),
                                pdeFont, &gState, sizeof(gState), NULL, 0, &textMatrix, NULL);
        PDEContentAddElem(pdeContent, kPDEAfterLast, (PDEElement)pdeText);
        PDPageSetPDEContent(pdPage, gExtensionID);  
        PDPageReleasePDEContent (pdPage, gExtensionID);
KIndly assume that PDEGraphicsState and PDETextMatrix are set properly set, I am not pasting entire code to avoid complexity.
Thank you,
Safiq

Dear lrosenth,
I went through some codes/suggestions in internet and I found that I need to have cmap file and cid font file for the respective font since pdf doesn't support unicode fonts directly.
Can you help me to know where can I get cmap file and cid font file for tamil language font Latha(TrueType) microsoft font.
Regards,
Safiq

Similar Messages

  • How to Extract the Highlight Text in PDF File

    Hi Scripters,
    i want know, how to extract the hightlight text in pdf files for text only format for (*.txt) file extension save.
    regards
    baby

    Hi,
    Okay i'll try do best.
    thanks for your reply.
    Regards
    Baby

  • How to remove a hidden text in pdf file with Acrobat Pro 9. How to save pdf file and remove hidden text?

    I
    I made this file in indesign, the highlited empty spaces indicates that their is a hidden text and it pop up when searching for some words in pdf file. so how can I save pdf file to keep only the seen text ???

    Dear lrosenth,
    I went through some codes/suggestions in internet and I found that I need to have cmap file and cid font file for the respective font since pdf doesn't support unicode fonts directly.
    Can you help me to know where can I get cmap file and cid font file for tamil language font Latha(TrueType) microsoft font.
    Regards,
    Safiq

  • How to Write BUFFER & Read TEXT with Encrypt file ?

    I'm using Windows Phone 8.1 RT.
    I have a issue :
    - I write a BUFFER encrypted to file. After, I read file with TEXT. It's throw exception : No mapping for the Unicode character exists in the target multi-byte code page. (//ERROR 2)
    - I write a TEXT encrypted to file. After, I read file with BUFFER. It's throw exception : The supplied user buffer is not valid for the requested operation. (//ERROR 1)
    Code Write Buffer & Read Text.
    //Write Textstring msg = EncryptText.Text;
    //ERROR 1 - Use 1 or 2
    await WriteTextAsync(this.file, msg);
    //ERROR 1
    //Read Buffer
    string msg;
    //ERROR 1 - Use 1 or 2
    IBuffer buffer = await ReadBufferAsync(this.file);
    StreamReader stream = new StreamReader(buffer.AsStream());
    msg = stream.ReadToEnd();
    //ERROR 1
    Code Encrypt-Decypt.
    public static string EncryptString(string msg)
                var bufferMsg = CryptographicBuffer.ConvertStringToBinary(msg, BinaryStringEncoding.Utf8);
                var bufferMsgEncrypted = Encrypt(bufferMsg);
                var msgEncrypted = CryptographicBuffer.EncodeToBase64String(bufferMsgEncrypted);
                return msgEncrypted;
            }public static IAsyncAction WriteTextAsync(IStorageFile file, string msg)
                return FileIO.WriteTextAsync(file, EncryptString(msg));
    public static IBuffer Decrypt(IBuffer bufferMsg)
                var key = CreateKey(KEY);
                var aes = SymmetricKeyAlgorithmProvider.OpenAlgorithm(SymmetricAlgorithmNames.AesCbcPkcs7);
                var symetricKey = aes.CreateSymmetricKey(key);
                var bufferMsgDecrypted = CryptographicEngine.Decrypt(symetricKey, bufferMsg, null);
                return bufferMsgDecrypted;
            }public static IAsyncOperation<IBuffer> ReadBufferAsync(IStorageFile file)
                var buffer = FileIO.ReadBufferAsync(file);
                Task<IBuffer> result = Task.Run<IBuffer>(async () =>
                    var Buffer = await buffer;
                    return Decrypt(Buffer);
                return result.AsAsyncOperation();
    Link demo code :
    https://drive.google.com/file/d/0B_cS3IYO936_akE0cmI4bExJMjh0RU9qR3RvWDBWWElZWC1z/view?usp=sharing

    Please provide a working app so this can be tested. You can upload to OneDrive and share a link here.
    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.
    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined
    objects and unknown namespaces.

  • How to use OCR Font A type by the time of writing some text into Pdf fil

    Hi,
    I am generating one pdf file in java. How can I use OCR Font A for text of pdf file ..Please can any one help where can I get OCR Font A and how to use that one in java ... I want to write some text into pdf file and that text should use OCR Font A family ...
    Thanks.

    This document shows how to disable OCR during conversion; just do the opposite: https://forums.adobe.com/docs/DOC-3062

  • How to control text for PDF Files in the BI7.0 Broadcaster

    Hi ,
    I am running a web template in the BI7.0 Broadcaster. The output prints in the PDF format. In the precalculation tab I have set up 4 variables(VAR1,VAR2 .. etc) . The main folder where these PDF files get stored I can control the text but dont know how to change the PDF file names which fall into this folder. All the PDF files have the technical name and number(like XXX_00000,XXX_00001 etc.) How can I control the text for these files.
    Thanks,
    Kal

    HI Kal,
    it is not possible to get any influence on the filenames. If you use Filternavigation the filename is generated to be unique.
    best regards,
    kai

  • How to write data to text file using external tables

    can anybody tell how to write data to text file using external tables concept?

    Hi,
    Using external table u can load the data in your local table in database,
    then using your local db table and UTL_FILE pacakge u can wrrite data to text file
    external table
    ~~~~~~~~~~~
    http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_7002.htm#i2153251
    UTL_FILE
    ~~~~~~~~~
    http://download-east.oracle.com/docs/cd/B19306_01/appdev.102/b14258/u_file.htm#sthref14093
    Message was edited by:
    Nicloei W
    Message was edited by:
    Nicloei W

  • How I Got WYSIWYG TLF Text To PDF from Flex

    Awesome results read more here:  http://hybridmindset.com/blog/How-I-Got-WYSIWYG-TLF-Text-To-PDF-from-Flex-Part-1

    Hi,
    Adobe Reader currently doesn't support Text to Speech, but we have added this to our database for consideration in a future release.
    Thanks for your feedback!
    -Gaurav

  • How do you edit document text in pdf in Acrobat Pro 11 Mac?

    How do you edit document text in pdf in Acrobat Pro 11 Mac? I know I can do it in the Windows version, but can't find same tool in Mac.

    Should be the same but it isn't. I have included a screenshot of my tools choices in both my Mac and PC versions - they are totally different.
    Mac version
    PC Version

  • How to read line number text from PDF using plugin?

    Hi, I would like to know how to read line number text from PDF using plugin?
    Thanks in advance.

    Ok, some background reading of the PDF Reference will help you understand why this is so difficult. PDF files are not organised into lines. It is best to think of each word or character on the page as being a graphic with its own position. The human eye sees lines where a series of graphics (words) are roughly in the same horizontal region.
    In the general case it is difficult or even impossible to answer this. You may have columns with different spacing (but the PDF stores no information on what is a column). You may have subscripts and superscripts. You may have text in graphics coinciding with other text. Commonly, there may be titles, headings or page numbers which are just ordinary text and might count as lines.
    That said, what you need to do is extract the text on the page and its positions. The WordFinder APIs are the way to do that. Now, sort all the words out, using the Y coordinates and size to try and guess what makes a "line". Now you are in a position to find the text (divided into words, not strings) and report the "line number" you have estimated.

  • Why can't I "Save as Text" a pdf file received as an email attachment?

    I can "Save as text" a pdf file which I have created in my own computer (that is, it goes into MS notebook that I then can Copy and Save as an MS Word file) but not when I receive a pdf as an email attachment. (The file is saved, but it is empty.) Why would I want to convert my own pdf back to text? Well, in case I no longer have the original Word document I suppose, but the thing is "Save as text" works with my pdf, but not with those I recieve from others. How come? Thanks!

    Is this a scanned PDF? If so, it must first be OCR'd.

  • How to write the nodevalue back to xml file?

    Hi, Everybody:
    These are two packages I used. javax.xml.parsers.*,org.w3c.dom.*
    Now I use "setNodeValue("abc") to set the node value to "abc". But it is not really saved back into XML file. It only change the node value in memory.
    How to write the changes back to XML file? Thank you very much for your help.
    Michelle

    * Version : 1.00
    * File Purpose : Given the xml file loads into dom and recreate the file with the updated values.
    * Developer : Kashif Qasim : 25/july/04
    * Modify detail :
    import java.lang.*;
    import java.io.*;
    import java.util.*;
    import java.text.*;
    import org.w3c.dom.*;
    import org.apache.xerces.parsers.DOMParser;
    import org.apache.xerces.*;
    public class XMLWriter
    private String displayStrings[] = new String[5000];
    private int numberDisplayLines = 0;
    private Document document;
    //private final Node c;
    public synchronized void displayDocument(String uri,Vector UpdatedValues,String getTaskID)
    try {
    DOMParser parser = new DOMParser();
    parser.parse(uri);
    document = parser.getDocument();
    display(document, "",UpdatedValues);
    } catch (Exception e) {
    e.printStackTrace(System.err);
    ReadXmlConfig objReadXmlConfig = null;
    FileWriter filewriter = null;
    try {
    filewriter = new FileWriter(uri);
    for(int loopIndex = 0; loopIndex < numberDisplayLines; loopIndex++){
    filewriter.write(displayStrings[loopIndex].toCharArray());
    //System.out.println("displayStrings[loopIndex].toCharArray() "+displayStrings[loopIndex].toString());
    //filewriter.write("\n");
    filewriter.close();
    System.gc();
    objReadXmlConfig = new ReadXmlConfig();
    objReadXmlConfig.ITSLog("File updated for "+getTaskID+" succesfully, file is closed now ");
    } catch (IOException e) {
    System.err.println("Caught IOException: " + e.getMessage());
    objReadXmlConfig = new ReadXmlConfig();
    objReadXmlConfig.ITSErrorLog("File updated FAILED for "+getTaskID+". Reason for file error "+e.toString());
    }finally {
    if (filewriter != null) {
    System.out.println("Closing File");
    objReadXmlConfig =null;
    try{
    filewriter.close();
    }catch(IOException e){
    System.err.println("Caught IOException: " + e.getMessage());
    } else {
    System.out.println("File not open");
    private void display(Node node, String indent, Vector UpdtRecs)
    if (node == null) {
    return;
    int type = node.getNodeType();
    NodeList nodeList = document.getElementsByTagName("QueryParm");
    int TotalRecs = UpdtRecs.size();
    switch (type) {
    case Node.DOCUMENT_NODE: {
    displayStrings[numberDisplayLines] = indent;
    displayStrings[numberDisplayLines] +=
    "<?xml version=\"1.0\" encoding=\""+
    "UTF-8" + "\"?>";
    numberDisplayLines++;
    displayStrings[numberDisplayLines] += "\n";
    display(((Document)node).getDocumentElement(), "",UpdtRecs);
    break;
    case Node.ELEMENT_NODE: {
    if(node.getNodeName().equals("QueryParm")) {
    for(int i =0 ; i< nodeList.getLength() ; i++)
    Node nodeQry = nodeList.item(i);
    NamedNodeMap nnp = nodeQry.getAttributes();
    for(int j= 0 ; j < nnp.getLength() ; j++)
    Attr atr = (Attr) nnp.item(j);
    if(atr.getName().equalsIgnoreCase("value_"+(i+1)))
    //System.out.println(atr.getName() +" : " + atr.getNodeValue() );
    atr.setNodeValue(UpdtRecs.get(i).toString());
    displayStrings[numberDisplayLines] = indent;
    displayStrings[numberDisplayLines] += "<";
    displayStrings[numberDisplayLines] += node.getNodeName();
    int length = (node.getAttributes() != null) ?
    node.getAttributes().getLength() : 0;
    Attr attributes[] = new Attr[length];
    for (int loopIndex = 0; loopIndex < length; loopIndex++) {
    attributes[loopIndex] = (Attr)node.getAttributes().item(loopIndex);
    for (int loopIndex = 0; loopIndex < attributes.length; loopIndex++) {
    Attr attribute = attributes[loopIndex];
    displayStrings[numberDisplayLines] += " ";
    displayStrings[numberDisplayLines] += attribute.getNodeName();
    displayStrings[numberDisplayLines] += "=\"";
    displayStrings[numberDisplayLines] += attribute.getNodeValue();
    displayStrings[numberDisplayLines] += "\"";
    displayStrings[numberDisplayLines]+=">";
    numberDisplayLines++;
    NodeList childNodes = node.getChildNodes();
    if (childNodes != null) {
    length = childNodes.getLength();
    indent += " ";
    for (int loopIndex = 0; loopIndex < length; loopIndex++ ) {
    display(childNodes.item(loopIndex), indent,UpdtRecs);
    break;
    case Node.CDATA_SECTION_NODE: {
    displayStrings[numberDisplayLines] = "";
    displayStrings[numberDisplayLines] += "<![CDATA[";
    displayStrings[numberDisplayLines] += node.getNodeValue();
    displayStrings[numberDisplayLines] += "]]>";
    numberDisplayLines++;
    break;
    case Node.TEXT_NODE: {
    displayStrings[numberDisplayLines] = "";
    String newText = node.getNodeValue().trim();
    if(newText.indexOf("\n") < 0 && newText.length() > 0) {
    displayStrings[numberDisplayLines] += newText;
    displayStrings[numberDisplayLines] += "\n";
    numberDisplayLines++;
    break;
    case Node.PROCESSING_INSTRUCTION_NODE: {
    displayStrings[numberDisplayLines] = "";
    displayStrings[numberDisplayLines] += "<?";
    displayStrings[numberDisplayLines] += node.getNodeName();
    String text = node.getNodeValue();
    if (text != null && text.length() > 0) {
    displayStrings[numberDisplayLines] += text;
    displayStrings[numberDisplayLines] += "?>";
    displayStrings[numberDisplayLines] += "\n";
    numberDisplayLines++;
    break;
    if (type == Node.ELEMENT_NODE) {
    displayStrings[numberDisplayLines] = indent.substring(0,
    indent.length() - 4);
    displayStrings[numberDisplayLines] += "</";
    displayStrings[numberDisplayLines] += node.getNodeName();
    displayStrings[numberDisplayLines] += ">";
    displayStrings[numberDisplayLines] += "\n";
    numberDisplayLines++;
    indent += " ";
    public static void main(String args[])
    Vector xmlValue = new Vector();
    xmlValue.add(0,"Kashif");
    xmlValue.add(1,"Qasim");
    //displayDocument("NewMediation.xml",xmlValue);
    <?xml version="1.0" encoding="UTF-8"?>
    <Mediation>
    <Task1>
    <Source>
    <SourceDriver>com.microsoft.jdbc.sqlserver.SQLServerDriver</SourceDriver>
    <SourceConnection>jdbc:microsoft:sqlserver://10.2.1.58:1433;DatabaseName=MTCVB_HDS;</SourceConnection>
    <SourceUser>sa</SourceUser>
    <SourcePassword>sa</SourcePassword>
    <Table>
    <SourceTable>t_Agent</SourceTable>
    <SourceQuery><![CDATA[SELECT SkillTargetID,PersonID,PeripheralID,EnterpriseName,PeripheralNumber,Deleted,TemporaryAgent,AgentStateTrace,ChangeStamp FROM t_Agent where SkillTargetID > {value_1} order by SkillTargetID]]>
    </SourceQuery>
    <SourceParm BusinessRule="" ColumnName="SKILLTARGETID" ColumnNumber="1" DataType="Numeric" DefaultValue="0" Format="mm/dd/yyyy xx:xx:xx XX">
    </SourceParm>
    <SourceParm BusinessRule="" ColumnName="PERSONID" ColumnNumber="2" DataType="String" DefaultValue="" Format="">
    </SourceParm>
    <SourceParm BusinessRule="" ColumnName="PERIPHERALID" ColumnNumber="3" DataType="String" DefaultValue="" Format="">
    </SourceParm>
    <SourceParm BusinessRule="" ColumnName="ENTERPRISENAME" ColumnNumber="4" DataType="String" DefaultValue="" Format="">
    </SourceParm>
    <SourceParm BusinessRule="" ColumnName="PERIPHERALNUMBER" ColumnNumber="5" DataType="String" DefaultValue="" Format="">
    </SourceParm>
    <SourceParm BusinessRule="" ColumnName="DELETED" ColumnNumber="6" DataType="String" DefaultValue="" Format="">
    </SourceParm>
    <SourceParm BusinessRule="" ColumnName="TEMPORARYAGENT" ColumnNumber="7" DataType="String" DefaultValue="" Format="">
    </SourceParm>
    <SourceParm BusinessRule="" ColumnName="AGENTSTATETRACE" ColumnNumber="8" DataType="String" DefaultValue="" Format="">
    </SourceParm>
    <SourceParm BusinessRule="" ColumnName="CHANGESTAMP" ColumnNumber="9" DataType="String" DefaultValue="" Format="">
    </SourceParm>
    <QueryParm FldName_1="SkillTargetID" FldType_1="Number" value_1="0">
    </QueryParm>
    </Table>
    </Source>
    </Task1>
    </Mediation>
    The QueryParm values are updated thru this code :)
    Hope it helps u ...

  • How can i change the size of PDF files ?

    how can i change the size of PDF files? when i convert documents in the acrobat browser it seems the files become larger then normal pdf files, this is, i compare with other files that people send to me and i realise that they are smaller than my converted files, even if they have more pages.

    A lot depends on the form of the PDF. Is it graphics, a scan of a text file, pure text, or other? What version of Acrobat are you working with.
    You can do a save as to get a WORD file, but do not expect great results. The ability to get a decent WORD file depends on what the form of PDF you are working from. If it was created from WORD with tags and all, you might get good results. If not, you might get a lot of messed up results.
    Explain what you are starting with and your ultimate goal. Also check the audit of the file (should be under PDF Optimize) to see where the file information is concentrated (text, fonts, graphics, other).

  • Editing text from pdf file

    how to edit text from pdf file?

    Adobe Reader does not allow editing the text of a PDF document. You will need to get Acrobat on your Windows or Mac to do that.

  • How do I download and print a pdf file in osx mountain lion

    How do I download and print a pdf file?

    control click on your PDF to download option
    Open it on your desktop Command-P is the short cut for print option.

Maybe you are looking for

  • GT70 2PC – Software testing and performance report.

    It is so excited here again. Currently, my first/only object after work is playing Titanfall. I intended to share another performance testing today. But I didn’t. I found there are too many great open box posts on different forums. Therefore, I decid

  • IPod touch and AV cable

    If I connect my iPod to a TV through AV cable (from Apple or other provider, connected to 30-pin socket), will the iPod's screen while watching a movie turn off to save battery?

  • HT201304 How do I get my iTunes security to send me an email again?

    My iTunes won't let me use my iTunes store because of security issues an I filled out my username and password but don't remember the answers to the security questions and it said it would send an email to verify to my email and I tried multiple time

  • Can't use microphone to audio chat. Can hear others, no input opt for me.

    Quicksilver Dual 1GHz G4 1.5GB RAM OS 10.4.10 iChat AV 3.1.8 I am unable to audio chat. If others initiate an audio chat with me I can hear them fine. This is not a bandwidth, router, or ISP related issue. I have professional microphones connected to

  • C2-01 Homescreen font Size and connectivity

    I have two problems 1. How to increase my home screen font size of day , date and time? 2. My C2-01 not getting connected to my PC which runs on windows xp. I have done exactly as mentioned by mahayv the technical expert in his post no.734 . Yet no c