PDF file not rendering properly
See original GitHub issueLink to PDF file (or attach file here): New.pdf
Configuration:
- Web browser and its version:Chrome Version 50.0.2661.94 (64-bit), also Safari Version 9.0.1 (11601.2.7.2)
- Operating system and its version: Mac OS X v10.11.1
- PDF.js version: pdfjs-1.4.20-dist, also tried pdfjs-1.5.188-dist
- Is an extension: No
Steps to reproduce the problem: Execute in dev tools console in Chrome:
PDFJS.disableWorker = true;
PDFJS.getDocument('<url to document>').then(function(pdf){
pdf.getPage(1).then(function(page){
viewport = page.getViewport(1);
canvas = document.getElementById('render-doc-here');
context = canvas.getContext('2d');
canvas.width = viewport.width;
renderContext = {canvasContext: context, viewport: viewport};
page.render(renderContext);
})
});
What is the expected behavior?
What went wrong?
Link to a viewer (if hosted on a site other than mozilla.github.io/pdf.js or as Firefox/Chrome extension): not hosted
Issue Analytics
- State:
- Created 7 years ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
Troubleshoot viewing PDF files on the web - Adobe Support
In Reader or Acrobat, right-click the document window, and choose Page Display Preferences. · From the list at left, select Internet. · Deselect ......
Read more >Pdf files not rendering properly to the browser ... - MSDN
User1796588957 posted. Hello Friends,. I am stuck with one issue in my project. My problem is , I need to display pdf files...
Read more >PDF file not rendering properly - Flexmonster
Hi Team, when we export pdf, each time it renders different. we do not see any consistent pattern, please find the attached screenshots...
Read more >50. Why won't my LaTeX render properly in the PDF export of ...
PDFs in general can be finicky, and LaTeX is no exception to this. If your LaTeX is not displaying properly in a PDF,...
Read more >PDFs Not Rendering Properly In Oracle Content Management
We have noticed that the output documents are not rendering correctly in OCE when viewed. The PDF's do appear to be correct when...
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
For future reference to others interested in using PDF.js with Ember, turning off extensions for Array appears to fix the issue of incorrect pdf rendering of some pdf files. https://guides.emberjs.com/v2.5.0/configuring-ember/disabling-prototype-extensions/
See e.g. https://github.com/mozilla/pdf.js/blob/master/examples/components/simpleviewer.js