How to create the new annotation and save it in existing PDF document?

510 views
Skip to first unread message

Parthipan R

unread,
Apr 23, 2018, 6:29:09 AM4/23/18
to pdfium
Hi All, 

I am trying to include the new annotation (any type) to existing PDF document using below method but I could not create it. After creating the annotation I need to save the annotation into loaded PDF document. Can you please provide syntax for saving new annotation into existing PDF document.

FPDFPage_CreateAnnot

Regards,
Parthipan 

Lei Zhang

unread,
Apr 23, 2018, 10:51:00 AM4/23/18
to Parthipan R, pdfium
Please see FPDFAnnotEmbeddertest.AddAndSaveUnderlineAnnotation for an
example of creating an annotation and saving it.
> --
> You received this message because you are subscribed to the Google Groups
> "pdfium" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to pdfium+un...@googlegroups.com.
> To post to this group, send email to pdf...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pdfium/aee6fe03-d761-4a15-ab7d-66f2f083e2ef%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Parthipan R

unread,
Apr 25, 2018, 7:31:53 AM4/25/18
to pdfium
Thanks Lei.

Now I can include the new annotations into the Loaded PDF document. But the included annotations are not rendered if I Load and render the same document using RenderBitmap API. Can you please let me know whether I missed any thinks here? 

Dan Sinclair

unread,
Apr 25, 2018, 10:24:51 AM4/25/18
to Parthipan R, pdfium
Are you providing the FPDF_ANNOT render flag when you call the Render methods? Without the flag the annotations won't be drawn.

dan


Reply all
Reply to author
Forward
0 new messages