API to extract fill and stoke patterns

29 views
Skip to first unread message

Miklos Vajna

unread,
Aug 11, 2026, 3:23:27 AM (4 days ago) Aug 11
to pdf...@googlegroups.com
Hi,

I attach a pair of PDF files that we're trying to parse with public APIs
(in Collabora Online) and the trouble is that the red color comes from a
fill and stoke pattern.

pdfium can render these PDFs fine.

My suggestion would be a pair of APIs, like:

FPDF_EXPORT FPDF_BITMAP FPDF_CALLCONV
FPDFPageObj_GetRenderedStrokePattern(FPDF_DOCUMENT document,
FPDF_PAGE page,
FPDF_PAGEOBJECT page_object);

and

FPDF_EXPORT FPDF_BITMAP FPDF_CALLCONV
FPDFPageObj_GetRenderedFillPattern(FPDF_DOCUMENT document,
FPDF_PAGE page,
FPDF_PAGEOBJECT page_object);

Which would expose this pattern info as public API.

Assuming the usual process is followed (documentation, hand-crafted
reproducer .in file, testcase, gerrit review), would it be reasonable to
add such APIs? I would be interested in adding those, just checking here
first.

Thanks,

Miklos
pattern-stroke.pdf
pattern-fill.pdf
Reply all
Reply to author
Forward
0 new messages