[7.0.1] width of pdf page exceed the maximum width and got trimmed from the right side
See original GitHub issueBug Report or Feature Request (mark with an x
)
- [ ] Regression (a behavior that used to work and stopped working in a new release)
- [x] Bug report -> please search issues before submitting
- [ ] Feature request
- [ ] Documentation issue or request
I have an issue with a pdf exceeding the width from style max-width
which is mentioned in the docs, but seems that does not work, that issue happened with the latest changes (version 7.0.1).
I was using it as simple as:
<pdf-viewer [original-size]="false" [render-text]="false" [src]="pdfUrl" style="display: block; max-width: 1200px; margin: 0 auto;"></pdf-viewer>
Which was working, and tried:
<pdf-viewer [original-size]="false" [zoom-scale]="'page-width'" [fit-to-page]="true" [autoresize]="true" [render-text]="false" [src]="pdfUrl"
style="display: block; max-width: 1200px; margin: 0 auto;"></pdf-viewer>
Nothing worked, but when I changed .ng2-pdf-viewer-container
to be position: relative
it is worked fine.
So the change that I can say is behind this issue is this: https://github.com/VadimDez/ng2-pdf-viewer/commit/8d4f8ad25107a98e920ab18e32b828c2e5597e54#diff-c0a5f3426a537629a18cbeb63abc55b7ce727f267c2e85acf84c88ddd96e4cb1R3
The problem solved only runtime, but if I do something like:
pdf-viewer {
::ng-deep {
.ng2-pdf-viewer-container {
position: relative;
}
}
}
I get only blank screen.
The workaround for this is to make the style inside pdf-viewer
tag:
pdf-viewer {
::ng-deep {
.ng2-pdf-viewer-container {
max-width: 1200px;
}
}
}
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:7 (1 by maintainers)
Top Results From Across the Web
How to change the size of a PDF page? - Adobe Support
Now enter the page measurements in the Scale pages section: Short edge: Width; Long edge: Height. The Edit fixup dialog box. Now click...
Read more >PDF Page Size Limitations - CADzation
In PDF Version 1.4 (Acrobat 5.0) and 1.5 (Acrobat 6.0) the maximum PDF page size was 200"x200". In PDF Version 1.6 (Acrobat 7.0)...
Read more >How to Change PDF Page Size Easily and Quickly
Is there a way to change page size of PDF? Open a PDF file in PDFelement, click the Page>Page Boxes button to resize...
Read more >UNICORN 7.0 Evaluation Manual
Click the small cross in the top right-hand corner of the navigator. ... the largest width of the identified narrower peaks, and must...
Read more >SoftMax Pro Data Acquisition and Analysis Software User Guide
To print to a .pdf file, select the Molecular Devices (PDF ... To import data from more than one Plate section in a...
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 Free
Top 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
The issue still exists, don’t close it.
Well, author is not replying 😕 that’s why no activity