createImage does not work with PDFs
See original GitHub issueHey there, hoping you could help me 😃
var myImage = pdf.createImage(fs.readFileSync(__dirname + '/mypdf.pdf')); doc.image(myImage);
Gives
Cannot read property ‘content’ of undefined",“stack”:"TypeError: Cannot read property ‘content’ of undefined\n at new module.exports (/node_modules/pdfjs/dist/pdfjs.js:2937:34
var contents = img.info.page.get('Contents').object
Gives
undefined
When using a jpg image everything works perfectly 😃
Issue Analytics
- State:
- Created 7 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
python wand gives TypeError when trying to create Image ...
I can't seem to find any document or proper example that create Image from pdf, but some examples on the Internet did it...
Read more >How to convert a PDF into an image with Adobe Acrobat
Convert a PDF file into an image to make sharing or storing easy. Adobe Acrobat makes converting PDFs into popular image formats (like...
Read more >How to Create Image Field in pdf form using Adobe Acrobat Pro
In this Video, I will show you, How to Create Image Field in pdf form using Adobe Acrobat Pro. ... Your browser can't...
Read more >How to Create a non-searchable (image only) PDF file?
To create a PDF Image Only document: •Open a document from a Windows application (Word, Excel, Edge, etc.) •Print the document and select...
Read more >Create Image from PDF: Reactive Web App - OutSystems
Its only work with PDF URL which are in same domain. ... I don't think javascript is able to generate a thumbnail from...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Good point. I’ve published
1.0.0-alpha.6
.2.0.0-alpha.1
probably throws because it requires a Node version >= 7Yeah same code expect I had express with
Got it working with:
Thank you again so much for all your help! 😃