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 original document into the viewport. #194

Merged

Conversation

borys-kupar
Copy link
Contributor

Hi there,

In my app I need to show the PDF files of different sizes, basically anything that user can upload. Showing the PDF document in original size is very convenient, but currently there is a problem with large documents, which are not fitting into the viewport. This is not very convenient for the user.

This can be avoided by using [original-size]=false, but this means that all smaller documents will be upscaled and look bad.

I thought it would be good to show the document in original size only if it fits into the viewport, otherwise it should be scaled to max-width to fit.

If you have other ideas on approaching this issue, pls let me know.

p.s. Please find attached example of large PDF - document.pdf

Thanks!

@VadimDez
Copy link
Owner

VadimDez commented Nov 6, 2017

I think this could be misleading. If i put [original-size]="true" i would probably expect it to be original size.
You could introduce new prop, such that old behaviour is not violated.

@borys-kupar
Copy link
Contributor Author

Yes, thought about that option too. Any suggestions on prop name? :)

@borys-kupar
Copy link
Contributor Author

I've added [fit-to-page] option, which is false by default, so old behaviour is not violated. What do you think?

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

Successfully merging this pull request may close these issues.

2 participants