Public function to generate AP for annot

32 views
Skip to first unread message

Liam McDermott

unread,
Jun 20, 2024, 10:16:03 AMJun 20
to pdfium
Hello,

I believe pdfium has no public function that an API consumer could use to generate (and set) an annotation's appearance stream.

I'd like to propose an addition to pdfium's public API: a function that would take an annotation handle, and generate the appearance stream for that annotation.

Use case: In the pdfium-render project, we have limited support for filling PDF forms. However, since pdfium's API lacks a way to generate an appearance stream for a form widget, some viewers display the form as though it had not been filled (bug report, for context).

Is the pdfium project likely to accept a patch to add this function?

I'm attaching a WIP patch for early feedback. If the response here is positive, I can create an issue on the bug tracker.

Thank you for taking the time to consider this.


Kind Regards,
Liam McDermott.
fpdfannot_generateap.patch

Lei Zhang

unread,
Jun 20, 2024, 3:16:36 PMJun 20
to Liam McDermott, pdfium
Hi Liam,

It looks like you have spent some time investigating the pdfium-render issue. Can you file a PDFium bug upstream via https://crbug.com/pdfium/new and we can discuss it there? I haven't looked into the issue at all, so I can't say for sure yet if adding a new public API is the right solution or not.

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/pdfium/85b05bff-c415-446b-9e65-78b0fce93a5an%40googlegroups.com.

Liam McDermott

unread,
Jun 21, 2024, 3:47:37 PMJun 21
to pdfium
Hello Lei,

Thank you for the guidance! I have filed a bug here: https://issues.chromium.org/u/1/issues/348669339

Kind Regards,
Liam.
P.S. Nice e-mail address.
Reply all
Reply to author
Forward
0 new messages