You need to read ISO 32000 (the PDF standard) more – or try a book such as my
“Developing with PDF” (<http://thepdfbook.com/>) to better under the various
data structures in a PDF, how they go together and then finally combine to make
an appearance stream for an annotation.
Leonard
From: VED PRAKASH <veda...@gmail.com<mailto:veda...@gmail.com>>
Date: Wednesday, June 11, 2014 at 8:11 AM
To:
"podofo-users@lists.sourceforge.net<mailto:podofo-users@lists.sourceforge.net>"
<podofo-users@lists.sourceforge.net<mailto:podofo-users@lists.sourceforge.net>>
Subject: [Podofo-users] How to add Appearance Steam (AP) annotations
Hi,
I have used your library to add FreeText annotations, the problem with the
annotations is it doesn't appear in any preview tool, includes Google, Adobe
Reader, FoxIT etc.
I tried to edit an added annotation through Mac inbuilt Preview tool, which
added an AP tag in the stream. I compared both the pdf by opening them in
TextEditor, I found the difference of AP tag, as per Adobe PDF reference, I
found it is necessary to add AP tag if you want to make annotation visible.
Now, I was wondering how can I add an AP tag through podofo, I have found
only single resource and put that in my code..
PoDoFo::PdfXObject xObj(rect,doc,NULL);
PoDoFo::PdfDictionary& annotationDic = anno->GetObject()->GetDictionary();
annotationDic.AddKey(PoDoFo::PdfName("N"),
PoDoFo::PdfObject(PoDoFo::PdfString([content UTF8String])));
xObj.AddColorResource(PoDoFo::PdfColor( 0.0,0.0,0.0));
xObj.AddResource(PoDoFo::PdfName("/Helv 12 Tf 0 g"),
xObj.GetObject()->Reference(),PoDoFo::PdfName("Font"));
anno->SetAppearanceStream(&xObj);
The above code doesn't seem to work, and too the value "/Helv 12 Tf 0 g"
appears encoded like "/#2FHelv#2012#20Tf#200#20g" this is looking incorrect for
me.
I have found few more problems, like there are some special or unwanted
characters added with FreeText annotation foreg. Contents(þÿMY ANNOTATION)..
Please help me to achieve this.
Thank you.
------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users