But the problem here isn’t PoDoFo – it’s that you are aren’t creating a valid
Appearance stream.
Leonard
From: VED PRAKASH <veda...@gmail.com<mailto:veda...@gmail.com>>
Date: Thursday, June 12, 2014 at 3:03 AM
To: Leonard Rosenthol <lrose...@adobe.com<mailto:lrose...@adobe.com>>
Cc:
"podofo-users@lists.sourceforge.net<mailto:podofo-users@lists.sourceforge.net>"
<podofo-users@lists.sourceforge.net<mailto:podofo-users@lists.sourceforge.net>>
Subject: Re: Re: How to add Appearance Steam (AP) annotations (Leonard
Rosenthol)
Thanks for the reply. Yes I have analyzed things, and got to know about
Appearance Stream, but I was wondering how to add appearance stream for
annotations using podofo, as you can see I am trying to add an AP tag similar
to an other PDF I have read, but it doesn't seem to working for me.
I seek more help regarding how to add an Appearance Stream through podofo.
On Wed, Jun 11, 2014 at 6:02 PM, Leonard Rosenthol
<lrose...@adobe.com<mailto:lrose...@adobe.com>> wrote:
You need to read ISO 32000 (the PDF standard) more – or try a book such as my
“Developing with PDF” (<http://thepdfbook.com/><http://thepdfbook.com/%3E>) 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