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

Render method produces poor quality images. #543

Closed
danvergara opened this issue Jan 21, 2024 · 3 comments
Closed

Render method produces poor quality images. #543

danvergara opened this issue Jan 21, 2024 · 3 comments

Comments

@danvergara
Copy link

Description

Render method from render package only produces poor quality images. The images sees blurry and seems the images' size is fixed to 612 × 792 pixels.

Expected Behavior

Higher quality images out pdf pages.

Actual Behavior

I've been consuming the unipdf package as a library, but the easiest way to reproduce this is running the cli.

unipdf render -o images.zip in_file.pdf
I got the exact same result.

Attachments

I'm attaching the Bitcoin Whitepaper because that was the pdf file I was testing against and the first one that came to my mind that is free to download.

unipdf render -o bitcoin.zip bitcoin.pdf

bitcoin.pdf

Copy link

Welcome! Thanks for posting your first issue. The way things work here is that while customer issues are prioritized, other issues go into our backlog where they are assessed and fitted into the roadmap when suitable. If you need to get this done, consider buying a license which also enables you to use it in your commercial products. More information can be found on https://unidoc.io/

@3ace
Copy link

3ace commented Jan 21, 2024

@danvergara you could set the image width by doing it like this:

device := render.NewImageDevice()
device.OutputWidth = 2048

The height will be calculated accordingly. This is the image output example of it

bitcoin_1

@danvergara
Copy link
Author

@3ace That worked for met!

Thanks!

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

2 participants