Skip to content
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

Page size is different in a PDF file #8439

Closed
luhantao opened this issue May 24, 2017 · 2 comments
Closed

Page size is different in a PDF file #8439

luhantao opened this issue May 24, 2017 · 2 comments
Labels

Comments

@luhantao
Copy link

Link to PDF file (or attach file here):
Linux+Bible+2010.pdf

When I use the official demo to render this PDF file, the first page is much smaller than other pages. The screenshot is below:

screenshot

My question is , Is there any ways that I can render all pages in a same size (width)? I have tried to change all PDFPageView objects' width attribute into a same value for all pages in viewer.js , but it doen't work. Does any one has any suggestions about this? Thanks a lot!

@adadgio
Copy link

adadgio commented Mar 21, 2018

I am having the same issue here, whatevet the scale chosen:

let pdfPageView = new PDFJS.PDFPageView({
                    container: this.viewerPlaceholder.nativeElement,
                    id: pageIndex,
                    scale: 1.0,
                    defaultViewport: pdfPage.getViewport(1.0),
                    // we can enable text/annotations layers, if needed
                    // textLayerFactory: new PDFJS.DefaultTextLayerFactory(),
                    // annotationLayerFactory: new PDFJS.DefaultAnnotationLayerFactory()
                })

      pdfPageView.setPdfPage(pdfPage)
      let task = pdfPageView.draw()
// then call other pages to be rendered in a loop...

@Snuffleupagus
Copy link
Collaborator

Link to PDF file (or attach file here):
Linux+Bible+2010.pdf

That document is no longer available, however this issue looks for all intents and purposes like a duplicate of #9359.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants