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

Fit screen view of the PDF #16

Open
vyasashish opened this issue Jun 27, 2016 · 4 comments
Open

Fit screen view of the PDF #16

vyasashish opened this issue Jun 27, 2016 · 4 comments

Comments

@vyasashish
Copy link

Hi,
this is actually not an issue.
I was trying to make the pdf fit the entire screen.
I am not able to make it working.
In PDF.JS there is an option called "Page-Fit" which scales the entire view to fit the screen.
Can you please give any pointer as to how it can be done in your application.
Thanks

@jellehermsen
Copy link

I wanted to achieve the same thing and it's actually pretty easy. No need to dive into pdf.js internals.

Since TouchPDF is already nice and responsive, all you need to do is get rid of the toolbar/tabs, tweak the settings a bit and expand the "MyPDF" div to to 100%. You can check out my fork with the necessary changes in my commit

@elasawilmar7
Copy link

When load first time show short, but when I next page show big. (screen 100%), I did how command in "my commit".
How can I show big first time ?

@ershadow786
Copy link

@elasawilmar7 i am facing same problem when pdf is loaded it aligned to left and looks smaller
but when i open console window it resizes and become big.I want to show big on first time.Did you solved your problem?

@saleo
Copy link

saleo commented Mar 4, 2017

@ershadow786 @elasawilmar7
two friends above, i met the same problem as you, and resolved by changing
var winHeight = $element.height() to var winHeight = $element.height()*2;
at line 629 in jquery.touchpdf.js..

worked on ubuntu16/chrome & android4.2+qq browser,but failed on iphone4+safari-which seems not the code-hacking problem, since even no code-hacking, the same failure on my iphone

cheers

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

No branches or pull requests

5 participants