-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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.js with nodejs white page #7525
Comments
I use canvas for getting the canvas image from pdf.js var data = new Uint8Array(fs.readFileSync('security.pdf'));
}); so here i got white images |
As mentioned in https://github.com/mozilla/pdf.js/blob/master/.github/CONTRIBUTING.md (I'm quoting the relevant section below), you need to provide access to a working example.
|
I noticed that you're attempting to use a node.js canvas implementation, which should explain the problems that you're experiencing since it's likely that there are differences between the canvas implementation in browsers (which is what PDF.js uses) and ones in node.js. Since this doesn't seem to be an issue with PDF.js, but rather with a node.js module, I'm closing this as invalid. |
Ok I did fix the part of canvas, and it workings good, but not for arabic text, arabic words are showed as squares. But I'm working on a nodejs tool to convert a pdf to list of png images. |
@HusseinTaha I think its |
@HusseinTaha How did you solve the canvas problem ? |
Hello @fareshan , |
@HusseinTaha You are great. It works. |
Welcome man, glad to hear that . |
FWIW, clean solution for npm's canvas will require mozCurrentTransform removal and refactoring of "scratch canvas" logic. |
Link to PDF file (or attach file here):
Configuration:
Steps to reproduce the problem:
What is the expected behavior? (add screenshot)
---canvas will exported as pngs
What went wrong? (add screenshot)
---canvas is white image
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: