-
Notifications
You must be signed in to change notification settings - Fork 10k
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
PDF displays boxes and images but no font. pdf.js:549 Warning: Unimplemented operator paintImageMaskXObjectGroup #12181
Comments
Without a test-case, the issue is unfortunately not actionable/valid.
Please note that React-PDF is a different project, which we cannot provide support for here.
That suggests that you're using the SVG-backend, which as mentioned in the Wiki is not officially supported; see https://github.com/mozilla/pdf.js/wiki/Frequently-Asked-Questions#backends |
I appreciate the quick input. I will look into your feedback. Thanks! |
Are we able to verify if the operator paintImageMaskXObjectGroup is an implemented operator in pdf.js? I opened an issue on the react-pdf project and they said to test this in firefox which I did and it still didn't so they said there is nothing they can do until pdf.js implements the paintImageMaskXObjectGroup operator. |
Again, without a test-case there's nothing that anyone can do here! Also, the particular error quoted here won't happen if you (as mentioned previously) use the default Edit: The fact that the React-PDF project apparently uses the officially unsupported SVG rendering back-end of the PDF.js library is a "bug" in that project; please note https://github.com/mozilla/pdf.js/wiki/Frequently-Asked-Questions#backends |
The canvas back-end is indeed the only officially supported back-end, and that implements Lines 2244 to 2284 in 9989879
The SVG back-end doesn't implement that operator yet, but as stated that back-end is experimental and not ready for production usage yet. In order to move this issue forward, we can only do something here with a PDF file that triggers this error. This can be done in three ways: try to make a PDF file using the same tool without the sensitive data, strip the sensitive data out using a PDF editor, or provide another non-sensitive document that triggers this operator. Once there is a test case for us to work with, we can look at implementing it. It's important to understand that without a test case it's essentially a blind implementation which is guaranteed to lead to bugs (and is not accepted in general since we require test cases, preferably automated but otherwise manual at the very least). |
Thanks for your reply. I am working on getting a pdf that doesn't have any sensitive data that I can upload. |
Please note that the SVG back-end should not actually implement There was a bug, in older PDF.js versions, whereby the |
I am attaching an example PDF. If you open it in Adobe you'll see what it should look like. |
The file in #12181 (comment) works for me, when opening it with the latest PDF.js version; you can try it yourself here: https://github.com/mozilla/pdf.js#online-demo Hence, once more, use the default |
That is good to see. React-pdf is supposed to be using the default canvas by default and you have to opt in to use the SVG which I am not doing. I am going to take a closer look at the versions we are using again. Thanks! |
@Snuffleupagus it was indeed the rendering mode. I just found out there was a property being set to svg and I had no idea. It works like magic now. I appreciate all the help! Why would someone want to change it from the default rendering mode to svg anyways? |
Attach (recommended) or Link to PDF file here: Sensitive data.
Configuration:
Steps to reproduce the problem:
1.
2.
What is the expected behavior? (add screenshot) Expected behavior is to display the PDF content like normal. When I download the response and save it as a pdf I can open it with adobe and everything is normal and the pdf is displayed correctly.
What went wrong? (add screenshot) Screenshot added. The pdf only displays checkboxes, boxes, or images. No font/data is showing. I get this error in the console Warning: Unimplemented operator paintImageMaskXObjectGroup. This is only happening for select PDFs. Other PDFs work just fine.
I can not find anything helpful regarding that warning so I was hoping someone could provide more clarity on it.
Link to a viewer (if hosted on a site other than mozilla.github.io/pdf.js or as Firefox/Chrome extension):
The text was updated successfully, but these errors were encountered: