Pdf

在不調整大小/修改內容的情況下無損地將 PDF 畫布放大到 A4

  • June 24, 2019

我想在不調整/修改內容的情況下無損地將 PDF 的畫布放大到 A4。

這是我的文件:

$ pdfinfo myFile.pdf 
Creator:        EO.Pdf
Producer:       EO.Pdf 16.2.50.0
CreationDate:   Mon Jun 17 14:30:34 2019
ModDate:        Mon Jun 17 14:30:34 2019
Tagged:         no
UserProperties: no
Suspects:       no
Form:           none
JavaScript:     no
Pages:          10
Encrypted:      no
Page size:      595 x 774 pts
Page rot:       0
File size:      656721 bytes
Optimized:      no
PDF version:    1.4
$ identify myFile.pdf
myFile.pdf[0] PDF 595x774 595x774+0+0 16-bit Bilevel DirectClass 58.1KB 0.030u 0:00.029
myFile.pdf[1] PDF 595x774 595x774+0+0 16-bit Bilevel DirectClass 58.1KB 0.020u 0:00.029
myFile.pdf[2] PDF 595x774 595x774+0+0 16-bit Bilevel DirectClass 58.1KB 0.020u 0:00.019
myFile.pdf[3] PDF 595x774 595x774+0+0 16-bit Bilevel DirectClass 58.1KB 0.020u 0:00.019
myFile.pdf[4] PDF 595x774 595x774+0+0 16-bit Bilevel DirectClass 58.1KB 0.010u 0:00.019
myFile.pdf[5] PDF 595x774 595x774+0+0 16-bit Bilevel DirectClass 58.1KB 0.010u 0:00.019
myFile.pdf[6] PDF 595x774 595x774+0+0 16-bit Bilevel DirectClass 58.1KB 0.010u 0:00.009
myFile.pdf[7] PDF 595x774 595x774+0+0 16-bit Bilevel DirectClass 58.1KB 0.010u 0:00.009
myFile.pdf[8] PDF 595x774 595x774+0+0 16-bit Bilevel DirectClass 58.1KB 0.000u 0:00.009
myFile.pdf[9] PDF 567x737 567x737+0+0 16-bit Bilevel DirectClass 58.1KB 0.000u 0:00.000

我試過了,目標尺寸很好,但質量損失很大:

$ convert myFile.pdf -page A4 myFile_A4.pdf
$ pdfinfo myFile_A4.pdf | egrep "Page( size|s):"
Pages:          10
Page size:      595 x 842 pts (A4)

如何使用開源或免費應用程序在不修改 PDF 文件內容的情況下將畫布大小調整到 595 x 842 pts?

要更改紙張尺寸pdftocairo

pdftocairo -pdf -paper A4 myFile.pdf myFile_A4.pdf
# or
pdftocairo -pdf -paperw 595 -paperh 842 myFile.pdf myFile_A4.pdf

要更改紙張大小並縮放其內容(您可能不想要):

pdftocairo -pdf -paper A4 -expand myFile.pdf myFile_A4.pdf

引用自:https://unix.stackexchange.com/questions/526624