Hi,

I am using the following code to add a value to an annotation of type
Widget. The value gets set to the pdf Dictionary along with the appearance
and but it does not show up in the  PDF file. In Adobe It only appears upon
clicking the annotation

PdfAnnotation* anno = pPage->GetAnnotation(annotationIndex);

PdfString sContent(reinterpret_cast<const PoDoFo::pdf_utf8*>([aValue
UTF8String]));

anno->SetContents(sContent);//This puts value into Contents not into V



//Getting the annotation Dictionary to Update "V" as i noticed manually
entering test to PDF annotation in Adobe updates this Value

PdfDictionary& annotationDic = anno->GetObject()->GetDictionary();
annotationDic.AddKey(PdfName("V"), PdfObject(PdfString([aValue UTF8String
])));

//Creating AP

PdfXObject xObj(rect,doc,NULL);

xObj.AddColorResource(PdfColor( 1.0, 0.0,0.0));

xObj.AddResource(PdfName("/Helv 12 Tf 0 g"), xObj.GetObject()->Reference(),
PdfName("Font"));



anno->SetAppearanceStream(&xObj);

doc->Write([tmpPath UTF8String]);


Using this, the Appearance dictionary get successfully
created.However,Looking through the internal PDF structure i found that i
am not writing into Content Stream.

Is that the reason the values are not appearing?.Any idea on how could i
create the bytes and write them?


Thank you so much



-- 
Regards,
Qamar Suleiman
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to