Page 1 of 1
Embedded fonts partially missing after OverlayPages
Posted: Thu Apr 18, 2024 11:58 am
by pschlan
Hi,
I have a weird issue here where I'm calling OverlayPages on an (empty) page to overlay a (non-empty) page from another document and, for a certain set of PDF files, randomly observe that the 2nd font of the source page is not ending up in the destination document.
I inspected the created document using iText RUPS and can see the second font (ArialMT-Bold) missing from the font dictionary. The result is broken text in the resulting document, as the font is substituted and the encoding is lost.
grafik.png
The font is definitely referenced in the page's content stream - multiple times.
This was with SDK version 10.1.3.383. Was there any known issue fixed in the last couple of releases? (I'm planning to upgrade soon.)
Any ideas what could go wrong here?
Thanks,
Patrick
Re: Embedded fonts partially missing after OverlayPages
Posted: Thu Apr 18, 2024 1:29 pm
by Stefan - PDF-XChange
Hello pschlan,
I do not recall any particular issues with fonts in 383, however at the same time - not all minor changes are listed in the version histories - so it possible that build 385 handles your files and fonts better.
So please do update, and if the issue is still present - would you be able to provide an example of the source files + the result, as well as the methods you are using to do the overlaying (or a whole sample project illustrating just that feature with NO license info inside)?
Kind regards,
Stefan
Re: Embedded fonts partially missing after OverlayPages
Posted: Thu Apr 18, 2024 3:57 pm
by pschlan
Hi Stefan,
sure, will update and observe.
The issue seemed random and the files cannot be shared for confidentiality reason, so I'd highly appreciate if a developer could just scan the code for apparent pitfalls, if that would be possible? I know it's not a great situation for debugging this issue...
In the meantime, I will run some more experiments to make a stable reproducer.
Thanks,
Patrick
Re: Embedded fonts partially missing after OverlayPages
Posted: Thu Apr 18, 2024 5:09 pm
by pschlan
Hi Stefan,
I have new insights which might help:
- The issue only happens when I overlay pages 1 and 4 of the source document into the new document (say over pages 1 and 2 in the new document)
- The source document has the two fonts in both page 1 and page 4, and it uses the same indirect object for them in each of the pages
- Page 1 of the source doc uses both fonts in the contents, page 4 only uses the first font (ArialMT) and not the 2nd one (ArialMT-Bold), but *does* have a reference to both indirect font objects in its resources.
My hypothesis now is that the SDK "optimizes away" the ArialMT-Bold font because it's not used in the contents of page 4 (which is overlayed last), but doesn't consider that it *is* referenced in contents of page 1.
Could somebody from your side check?
Thanks,
Patrick
Re: Embedded fonts partially missing after OverlayPages
Posted: Fri Apr 26, 2024 8:29 pm
by Daniel - PDF-XChange
Hello, pschlan
We have not yet been able to reproduce the issue, if this is file specific we do need to see one of these files to dig any further into this. If necessary, you can email us directly with a copy of the sensitive file, and we can assure you they will be destroyed as soon as we have completed our investigation. If that is not an option, perhaps you could try redacting the sensitive items from the document, and then see if the issue still occurs on what remains of these pages? If the redacted document has the same issue, please send us a copy of that instead.
Our email address is <
Support@PDF-XChange.com>. If you include "Attn: Dan" in the subject line of your email, and a link to this post, I will directly handle the case and ensure that only myself and our lead developer have access to your files.
Kind regards,
Re: Embedded fonts partially missing after OverlayPages
Posted: Thu May 02, 2024 11:08 am
by pschlan
Hi Daniel,
thanks a lot.
I've spent some time and managed to create a redacted reproducer file. Since I can't be sure I hit all confidential info, I still sent it via email, along with source code for reproducing the problem.
Please let me know in case you have any questions.
Best,
Patrick
Re: Embedded fonts partially missing after OverlayPages
Posted: Thu May 02, 2024 11:48 am
by Stefan - PDF-XChange
Hello pschlan,
Thanks for this! I can confirm that the mail is received and Dan will take a look at it when he gets to the office (he is in our Pacific Time Zone office - so it's still a bit early there - 4:48 AM

).
Kind regards,
Stefan
Re: Embedded fonts partially missing after OverlayPages
Posted: Fri May 03, 2024 5:09 pm
by Daniel - PDF-XChange
Hello, once again!
Ivan has just reported to me that the issue has been found and resolved on this end. The fix will require an update, so keep an eye out for our next release. I cannot offer a timeline on when that is coming just yet.
Kind regards,
Re: Embedded fonts partially missing after OverlayPages
Posted: Sun May 12, 2024 3:19 pm
by pschlan
Thanks a lot, looking forward to it!
Embedded fonts partially missing after OverlayPages
Posted: Mon May 13, 2024 7:06 am
by Dimitar - PDF-XChange
Re: Embedded fonts partially missing after OverlayPages
Posted: Thu Jun 20, 2024 12:49 pm
by pschlan
Hi,
is this fixed in the new build 10.3.1.387? I can't find any hint in the release notes.
Thanks,
Patrick
Re: Embedded fonts partially missing after OverlayPages
Posted: Thu Jun 20, 2024 2:01 pm
by Stefan - PDF-XChange
Hello pschlan,
Not all things that do get fixed are included in the notes, however looking at the above messages - it was likely a quick fix done at the spot, and as such was then not included in the build notes. Please do download and try 387 and let us know if it resolves the issue for you!
Kind regards,
Stefan
Re: Embedded fonts partially missing after OverlayPages
Posted: Sat Jun 22, 2024 1:33 pm
by pschlan
The issue is resolved, thanks a ton!
Embedded fonts partially missing after OverlayPages
Posted: Mon Jun 24, 2024 8:48 am
by Dimitar - PDF-XChange