Quantcast
Channel: Adobe Community: Message List - Acrobat SDK
Viewing all articles
Browse latest Browse all 10848

how to write a unicode text in pdf file

$
0
0

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


Viewing all articles
Browse latest Browse all 10848

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>