![]() ![]() >=> cpdfscale 1640 2360 origin.pdf scaled. Scaled Output File : 1640x2360 - origin.pdf Here is the output: >=> cpdfscale 1640 2360 origin.pdf The core command to get my work done is: cpdf -scale-page "3.253968 4.173453" origin.pdf -o scaled.pdf cpdfscale 1640 2360 origin.pdf scaled.pdf The following command convert any pdf file for my iPad Air4 which has a screen with size 1640 x 2360 pts. If the output file is not specified, a new file name with origin nameĪnd new file page dimensions $.pdf Select custom and change the page to the size you desire. In the dialog box that opens on the bottom left is Change Page Size. pdf).pdf)Ĭpdf -scale-page "$sx $sy" $argv -o $outfile &> /dev/nullĬpdfscale x_size_in_pts y_size_in_pts input.pdf. Draw a box around your page, doesnt matter what size, and hit enter. Set -l outfile (echo $argvx$argv - (basename $argv. ![]() ![]() Set -l dim_y (pdfinfo $argv | grep -a "Page size" | cut -d\: -f2 | cut -dx -f2 | cut -d' ' -f2 | sed 's/^*//')Įcho Origin Page Size\t :\t $dim_x x $dim_y ptsĮcho Scaled Page Size\t :\t $argv x $argv ptsĬpdf -scale-page "$sx $sy" $argv -o $argv &> /dev/null Set -l dim_x (pdfinfo $argv | grep -a "Page size" | cut -d\: -f2 | cut -dx -f1 | sed 's/^*//') Here is the cpdfscale.fish source code: function cpdfscale I use a fish function cpdfscale which depends on pdfinfo and cpdf to convert pdf files for my apple devices. Here is the command, you need to calculate the scale ratio when use cpdf with the option -scale-page cpdf -scale-page "x_ratio_not_size y_ratio_not_size" input.pdf -o output.pdf Thanks, I tried pdfScale.sh and cpdf, and cpdf works for me.Ĭpdf will stretch the cover and content to fill the entire page without extra white space left. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |