Comments (1)
That is interesting. The GS calls look pretty much identical. Weird.
EDIT: I though you had the pdfScale GS calls there, but now I am not sure.
Are those GS calls from pdfScale?
If not, can you run both calls with -v --print-gs-call
for us to compare both calls and the verbose info?
I made some tests here and the GS calls seems identical, just with Width X Height changed.
Paper std 11x17
$ ./pdfScale.sh --print-gs-call -v -r 11x17 mint.pdf
pdfScale.sh v2.6.1 - Verbose Execution
Single Task: Resize PDF Paper
Dry-Run: FALSE
Input File: mint.pdf
Output File: mint.11X17.pdf
Get Page Size: Adaptive Enabled
Method: Grep
Source Width: 596 postscript-points
Source Height: 843 postscript-points
Print Mode: Print ( auto/empty )
Scale Factor: Disabled (resize only)
Fit To Page: Enabled (default)
Auto Rotate: PageByPage
Flip Detect: No change needed
Run Resizing: 11X17 ( 792 x 1224 ) pts
Final Status: File created successfully
[GS RESIZE CALL STARTS]
"/usr/bin/gs" -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dSAFER -dCompatibilityLevel="1.5" -dPDFSETTINGS="/printer" -dColorImageResolution=300 -dGrayImageResolution=300 -dColorImageDownsampleType="/Bicubic" -dGrayImageDownsampleType="/Bicubic" -dColorConversionStrategy=/LeaveColorUnchanged -dSubsetFonts=true -dEmbedAllFonts=true -dDEVICEWIDTHPOINTS=792 -dDEVICEHEIGHTPOINTS=1224 -dAutoRotatePages=/PageByPage -dFIXEDMEDIA -dPDFFitPage -sOutputFile="mint.11X17.pdf" -c "" -f "mint.pdf"
[GS RESIZE CALL ENDS]
Paper custom in 15 10
$ ./pdfScale.sh --print-gs-call -v -r 'custom in 15 10' mint.pdf
pdfScale.sh v2.6.1 - Verbose Execution
Single Task: Resize PDF Paper
Dry-Run: FALSE
Input File: mint.pdf
Output File: mint.CUSTOM.pdf
Get Page Size: Adaptive Enabled
Method: Grep
Source Width: 596 postscript-points
Source Height: 843 postscript-points
Print Mode: Print ( auto/empty )
Scale Factor: Disabled (resize only)
Fit To Page: Enabled (default)
Auto Rotate: PageByPage
Flip Detect: Wrong orientation detected!
Inverting Width <-> Height
Run Resizing: CUSTOM ( 720 x 1080 ) pts
Final Status: File created successfully
[GS RESIZE CALL STARTS]
"/usr/bin/gs" -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dSAFER -dCompatibilityLevel="1.5" -dPDFSETTINGS="/printer" -dColorImageResolution=300 -dGrayImageResolution=300 -dColorImageDownsampleType="/Bicubic" -dGrayImageDownsampleType="/Bicubic" -dColorConversionStrategy=/LeaveColorUnchanged -dSubsetFonts=true -dEmbedAllFonts=true -dDEVICEWIDTHPOINTS=720 -dDEVICEHEIGHTPOINTS=1080 -dAutoRotatePages=/PageByPage -dFIXEDMEDIA -dPDFFitPage -sOutputFile="mint.CUSTOM.pdf" -c "" -f "mint.pdf"
Comparing
"/usr/bin/gs" -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dSAFER -dCompatibilityLevel="1.5" -dPDFSETTINGS="/printer" -dColorImageResolution=300 -dGrayImageResolution=300 -dColorImageDownsampleType="/Bicubic" -dGrayImageDownsampleType="/Bicubic" -dColorConversionStrategy=/LeaveColorUnchanged -dSubsetFonts=true -dEmbedAllFonts=true -dDEVICEWIDTHPOINTS=792 -dDEVICEHEIGHTPOINTS=1224 -dAutoRotatePages=/PageByPage -dFIXEDMEDIA -dPDFFitPage -sOutputFile="mint.11X17.pdf" -c "" -f "mint.pdf"
"/usr/bin/gs" -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dSAFER -dCompatibilityLevel="1.5" -dPDFSETTINGS="/printer" -dColorImageResolution=300 -dGrayImageResolution=300 -dColorImageDownsampleType="/Bicubic" -dGrayImageDownsampleType="/Bicubic" -dColorConversionStrategy=/LeaveColorUnchanged -dSubsetFonts=true -dEmbedAllFonts=true -dDEVICEWIDTHPOINTS=720 -dDEVICEHEIGHTPOINTS=1080 -dAutoRotatePages=/PageByPage -dFIXEDMEDIA -dPDFFitPage -sOutputFile="mint.CUSTOM.pdf" -c "" -f "mint.pdf"
So, identical calls, just with different sizes in points.
While looking at the verbose info, I noticed that the custom
call actually inverted the orientation and caused the script to invert the Width X Height
. Not sure if that is relevant, but it is a difference.
Auto Rotate: PageByPage
Flip Detect: Wrong orientation detected!
Inverting Width <-> Height
You can disable flip-detection with -f d
. But this only inverts the values of Width and Height and nothing else.
You can also mess with the auto-rotation options to see if it helps.
from pdfscale.
Related Issues (20)
- Donation methods HOT 1
- Losing links HOT 3
- Issue with PDF output size HOT 20
- Resize and not preserve scale HOT 5
- Can you resize and fill the page instead of fitting the image? HOT 4
- Architectural paper size names in command line arguments rejected as invalid. HOT 1
- Licence missing HOT 1
- a specific png is being compressed into a jpeg... HOT 4
- Centering objects in resize mode seems to be broken HOT 2
- function isFloatBiggerThanZero() is broken HOT 3
- typo: milimeters -> millimeters HOT 1
- typo: used used -> used HOT 1
- misspelling: usefull -> useful HOT 1
- Unquoted $0 in basename $0 - basename: extra operand issues HOT 2
- How to decrease pdfscale execution time? HOT 1
- Export-Import PDF Metadata - Geospatial data not written to output HOT 5
- Ghostscript complains about the old PDF interpreter being deprecated HOT 4
- what license? HOT 2
- [BUG]: `-dNEWDPF` deprecated?! Page drawing error! HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pdfscale.