Re: PDF problem - Help needed
Michael Sweet <[email protected]> Thu, 11 Sep 2025 11:02:22 -0400
| Newsgroups | dev.linux.lists.printing-architecture |
|---|---|
| Message-ID | <[email protected]> |
Till,
I don't have a lot of time to look at this right now, but from the =
standpoint of adding the appearance streams as XObject resources in the =
page dictionary, you still need to *draw* the objects from the page =
content stream using the "Do" operator. For example, if the XObject was =
named "foo" then you'd need to add:
/foo Do
to the content stream.
> On Sep 11, 2025, at 10:50=E2=80=AFAM, Till Kamppeter =
<[email protected]> wrote:
>=20
> [ This mail is addressed to people from whom I know that they have =
konwledge on
> the inner workings of the PDF file format due to the projects they =
are working
> on. ]
>=20
> Hi,
>=20
> Uddhav Phatak (CCed) has done a GSoC 2024 project on eliminating C++ =
in libcupsfilters, mainly by replacing the PDF manipulator QPDF by Mike =
Sweet's PDFio.
>=20
> His project report:
>=20
> =
https://medium.com/@uddhavphatak/gsoc-2024-final-report-the-refactor-repor=
t-a46756e9d6ce
>=20
> His code as PR #71 on libcupsfilters:
>=20
> https://github.com/OpenPrinting/libcupsfilters/pull/71
>=20
> Some parts he did not succeed to complete withing the GSoC time frame =
due to their complexity.
>=20
> What is remaining to be completed is flattening filled forms and =
annotations into static content of the PDF, so that the filled in text =
is correctly taken into account by doing page manipulations (like N-up) =
and that it is assured that the text gets printed.
>=20
> On this step Uddhav ran into a problem:
>=20
> -----
> Hi Till,
> I am not able to debug one issue, could you help me where I might be =
going wrong,
>=20
> form_english_filled.pdf and needtrue.pdf, both have needAppearances =
set as true.
>=20
> form_english_filled.pdf is successfully flattened as shown in test.pdf
>=20
> but when converting needtrue.pdf into needtrue-test.pdf, even though =
all the annotation objects are successfully converted to Xobjects and =
added into the page dict, I am not understanding why aren't they =
visible.
>=20
> Can you look through this and tell me where I might be going wrong, =
and what value is missing from the Xobject Dictionary.
> -----
>=20
> The files mentioned here are all attached.
>=20
> Anybody has an idea what can be wrong here?
>=20
> Thanks in advance.
>=20
> Till
> <test.pdf><needtrue-test.pdf><needtrue.pdf><form_english_filled.pdf>
________________________
Michael Sweet