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

PDF Auto Resize #98

Closed
aa-telali opened this issue Jun 17, 2017 · 5 comments
Closed

PDF Auto Resize #98

aa-telali opened this issue Jun 17, 2017 · 5 comments
Assignees
Milestone

Comments

@aa-telali
Copy link

aa-telali commented Jun 17, 2017

Hi all,

[Using v1.1.0]

Original Question: How would I get the pdf to grow and shrink with the width of the page?

Update: Looking at the code I think the resize behaviour has been moved from the sample to the internal implementation of the pdf-viewer, and it looks like (above 480px) it should do what I'm expecting (increase the size of the visible PDF when I increase the page width)..

I've got:

.div-pdf {
      margin-left: auto;
      margin-right: auto;
      width: 100%;
   }
   pdf-viewer {
      display: block;
   }
<div class="div-pdf">
                <pdf-viewer 
                  [src]="pdfSrc" 
                  [page]="pdfPage" 
                  [original-size]="pdfOriginalSize" 
                  [show-all]="pdfShowAll" 
                  [render-text]="pdfRenderText" 
                  [zoom]="pdfZoom" 
                  [rotation]="pdfRotation">
                </pdf-viewer>
              </div>
  pdfPage = 1;
  pdfRotation = 0;
  pdfZoom = 1.0;
  pdfOriginalSize = false;
  pdfShowAll = false;
  pdfRenderText = false;

Any ideas? I've noticed this is what happens on the demo but can't seem to find the right code in the source...

Thanks in advance!

@mihilranathunga
Copy link

mihilranathunga commented Jul 6, 2017

simply said the rendered PDF is not responsive. Even the demo is not responsive, But demo provided by PDFJS is. May be this has something to with the PDFJS version used in this component.

I'm also interested in this feature

@celloman
Copy link

celloman commented Jul 6, 2017

I'm also interested in this feature. I appears that the logic for resizing is present in the repository but not in the npm package yet.

@PendelinP
Copy link

+1 I'm also pretty interested in this feature ;) Thanks

@VadimDez VadimDez self-assigned this Aug 8, 2017
@VadimDez VadimDez added this to the 1.2.0 milestone Aug 8, 2017
VadimDez added a commit that referenced this issue Aug 8, 2017
Closes #98, added auto-resize feature
@priyadarshiniMuthuraman

This 129c37f fix has not been added to the npm package. Please verify

@whatwehaveunlearned
Copy link

what happened with this?

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

No branches or pull requests

7 participants