mirror of
https://github.com/flyimg/flyimg.git
synced 2026-04-25 09:45:50 +03:00
[GH-ISSUE #303] PDF resolution option #739
Labels
No labels
Docs
Docs
Docs
Security
UnitTest
bug
dependencies
duplicate
enhancement
enhancement
enhancement
hacktoberfest
help wanted
invalid
pull-request
question
stale
version 1
version 2
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/flyimg#739
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @v1o on GitHub (Mar 2, 2021).
Original GitHub issue: https://github.com/flyimg/flyimg/issues/303
Hi, is there a way to specify the PDF render resolution?
Thank you.
@sadok-f commented on GitHub (Mar 3, 2021):
Hi @v1o ,
Thank you for your issue, unfortunately, such an option doesn't exist
@v1o commented on GitHub (Mar 3, 2021):
Would you be able to point me in the right direction? We could build a custom image with some modified ghostscript params, I'm not really sure where this hook would happen.
@v1o commented on GitHub (Mar 3, 2021):
I saw ghostscript being installed in this image and not the base one, but I couldn't find any reference to it in the code.
@sadok-f commented on GitHub (Mar 3, 2021):
The thing is this feature was added by another contributor, I thought also it is using
ghostscriptbut it seems no isn't used.If you add
rf_1to refresh the image, in the response headers there's one calledim-commandwhich shows the full command used to generate the final image.For the PDF case, it uses imagemagick (it could be imagemagick needs ghostscript to read from the PDF but I'm not sure and I need to debug more).
Since it is a imagemagick cmd, you can increase the quality (default 90) to 100 by adding
q_100option, also you can try to generate a different format such PNG witho_pngoption.@louisl commented on GitHub (Mar 11, 2021):
Was just looking around and saw this. It's been a while since I made that feature. Ghostscript was/is? indeed a requirement for imagemagick to handle PDF's and not used directly as mentioned.
@sadok-f commented on GitHub (Mar 12, 2021):
Thank you @louisl for clarifying this, maybe we should add it to README file.
@v1o commented on GitHub (Mar 12, 2021):
Thank you @sadok-f, the
rf_1flag really helped.I was unable to use
qualityoption for my purpose since ImageMagick uses it in the post-process part of the convert operation.In the end I've used the
-densityoption which does the trick when used correctly (before the input file).I've pushed the changes here and updated the documentation as well. If it matches your coding standards I can send over a pull-request.
Again, thank you for your help.
@sadok-f commented on GitHub (Mar 12, 2021):
Thank you @v1o !
Glad to hear you're able to fix that, would be great if you can send the pull request.
@v1o commented on GitHub (Mar 12, 2021):
Just sent the pull request.