Missing FPDF_SetMetaText API?

267 views
Skip to first unread message

Stephen Cross

unread,
Jul 22, 2020, 9:45:11 AM7/22/20
to pdfium
I noticed that there's an FPDF_GetMetaText API (for getting document metadata, such as title, author, etc.), but there isn't an FPDF_SetMetaText API.

From the looks of it this is just a lack of a public C API? I was looking at a Ruby binding for PDFium (admittedly quite old code), and it seemed to reach in to the CPDF_Document, so I assume PDFium clients have to use the C++ API for this.

Assuming this is correct, would it be reasonable to add an FPDF_SetMetaText API alongside the FPDF_GetMetaText API in public/fpdf_doc.h? Assuming I have time to do this at some point, I should submit the patch to https://bugs.chromium.org/p/pdfium/issues/list ?

Lei Zhang

unread,
Jul 22, 2020, 10:45:44 AM7/22/20
to Stephen Cross, pdfium
Oftentimes getter APIs appear first, before setter APIs. It is
probably not too hard to add such an API. This feature request already
exists as https://crbug.com/pdfium/1471. If you want to submit code to
add the API, please don't attach a patch to the issue tracker.
Instead, follow the process in
https://pdfium.googlesource.com/pdfium/+/master/CONTRIBUTING.md.
> --
> 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/38a242be-bdbe-45d0-84cb-93f48714b856o%40googlegroups.com.

Lothar Scholz

unread,
Oct 19, 2020, 7:54:45 PM10/19/20
to pdfium

Metadata extraction can be much more complicated then what is possible with the simple Pdfium  API. Please use Adobes open source  XMP (extensible metadata platform) library for maximum compatibility.

Lei Zhang

unread,
Oct 19, 2020, 7:58:07 PM10/19/20
to Lothar Scholz, pdfium
Reply all
Reply to author
Forward
0 new messages