FPDF_NewXObjectFromPage() src_doc scope?

36 views
Skip to first unread message

geisserml

unread,
Apr 30, 2026, 3:24:25 PM (9 days ago) Apr 30
to pdfium
Hi,

could you please clarify if the src_doc from FPDF_NewXObjectFromPage() needs to remain alive while the XObject lives, or if it is OK to close the src_doc while the XObject is still in use with the dest_doc?

Currently the docs just say "Caller owns the newly created object [FPDF_XOBJECT]", but don't explicitly tell if src_doc needs to stay or not.

Thanks!

geisserml

unread,
May 1, 2026, 8:53:31 AM (8 days ago) May 1
to pdfium
Figured I could just see what happens when closing the src_doc right after FPDF_NewXObjectFromPage(). FWIW it seems to work.

Lei Zhang

unread,
May 7, 2026, 1:16:41 AM (3 days ago) May 7
to geisserml, pdfium
Uploaded https://pdfium-review.googlesource.com/147290 to update the
documentation and prove it is correct.
> --
> 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 visit https://groups.google.com/d/msgid/pdfium/0ba34dc2-5771-4cce-9b59-11aa7da8e1fbn%40googlegroups.com.

geisserml

unread,
May 7, 2026, 8:11:10 AM (2 days ago) May 7
to pdfium
Thank you very much!
Reply all
Reply to author
Forward
0 new messages