-
Notifications
You must be signed in to change notification settings - Fork 251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PdfDocumentBuilder creates broken file when copying pages from specific source PDFs #936
Comments
This might be related to an embedded font. Sometimes the end users get an error message like "The embedded font "EVPYXN+NotoSerifCJKjp-Regular-Identity-H" coud not be loaded..." from Acrobat Reader. But that error isn't shown every time and I haven't seen it myself yet. Also, if the PDF (either of the two) is resaved with Acrobat Reader then the problem doesn't happen any more. |
@cremor thanks for the added context. I'll try to have a look soon but any help here would be really appreciated 😄 |
There are additional details which point to a problem with fonts:
I'd like to help to fix this, but don't know where to start. Any tips? |
@BobLd Did you have any time to look at this bug? If not, could you point me to the right place where I could try to start to fix it myself? |
@cremor unfortunately I did not have time to look into that yet, and I'm not sure I'll have the time in the short term. I'll try to find some pointers so that you can look into it shortly |
I have an application that uses PdfPig to merge multiple PDF files. I'm using
PdfDocumentBuilder.AddPage
for this.The users of the application have reported a case where the created (merged) PDF is invalid and contains broken/garbled text. When I open the created PDF in Acrobat Reader I even get an error message saying that the PDF page contains errors.
Sample input files:
According to its metadata this file was created with OpenOffice.
This is based on the same file as the first, but was edited with Wondershare PDFelement to add some comments as annotations.
Sample code:
I've tested the following versions of PdfPig, all are affected:
Input:

Output when shown in Acrobat Reader:

Ouput when shown in Microsoft Edge:

The text was updated successfully, but these errors were encountered: