Embedded fonts partially missing after OverlayPages
Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Stefan - PDF-XChange
Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.
When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.
When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
-
- User
- Posts: 17
- Joined: Thu Nov 15, 2018 10:14 pm
Embedded fonts partially missing after OverlayPages
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.
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
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.
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
You do not have the required permissions to view the files attached to this post.
-
- Site Admin
- Posts: 19913
- Joined: Mon Jan 12, 2009 8:07 am
Re: Embedded fonts partially missing after OverlayPages
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
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
-
- User
- Posts: 17
- Joined: Thu Nov 15, 2018 10:14 pm
Re: Embedded fonts partially missing after OverlayPages
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
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
-
- User
- Posts: 17
- Joined: Thu Nov 15, 2018 10:14 pm
Re: Embedded fonts partially missing after OverlayPages
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
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
-
- Site Admin
- Posts: 11252
- Joined: Wed Jan 03, 2018 6:52 pm
Re: Embedded fonts partially missing after OverlayPages
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,
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,
Dan McIntyre - Support Technician
PDF-XChange Co. LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
PDF-XChange Co. LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
-
- User
- Posts: 17
- Joined: Thu Nov 15, 2018 10:14 pm
Re: Embedded fonts partially missing after OverlayPages
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
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
-
- Site Admin
- Posts: 19913
- Joined: Mon Jan 12, 2009 8:07 am
Re: Embedded fonts partially missing after OverlayPages
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
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
-
- Site Admin
- Posts: 11252
- Joined: Wed Jan 03, 2018 6:52 pm
Re: Embedded fonts partially missing after OverlayPages
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,
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,
Dan McIntyre - Support Technician
PDF-XChange Co. LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
PDF-XChange Co. LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
-
- User
- Posts: 17
- Joined: Thu Nov 15, 2018 10:14 pm
Re: Embedded fonts partially missing after OverlayPages
Thanks a lot, looking forward to it!
-
- Site Admin
- Posts: 2252
- Joined: Mon Jan 15, 2018 9:01 am
-
- User
- Posts: 17
- Joined: Thu Nov 15, 2018 10:14 pm
Re: Embedded fonts partially missing after OverlayPages
Hi,
is this fixed in the new build 10.3.1.387? I can't find any hint in the release notes.
Thanks,
Patrick
is this fixed in the new build 10.3.1.387? I can't find any hint in the release notes.
Thanks,
Patrick
-
- Site Admin
- Posts: 19913
- Joined: Mon Jan 12, 2009 8:07 am
Re: Embedded fonts partially missing after OverlayPages
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
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
-
- User
- Posts: 17
- Joined: Thu Nov 15, 2018 10:14 pm
Re: Embedded fonts partially missing after OverlayPages
The issue is resolved, thanks a ton!
-
- Site Admin
- Posts: 2252
- Joined: Mon Jan 15, 2018 9:01 am