I recently needed a single blank PDF page (8.5" x 11" size) and realized that I didn't know how to make one from the command line.
Issuing touch blank.pdf
produces an empty PDF file. Is there a command line tool that produces an empty PDF page?
convert
, the ImageMagick utility used in Ketan's answer, also allows you to write something like
convert xc:none -page Letter a.pdf
or
convert xc:none -page A4 a.pdf
or (for horizontal A4 paper)
convert xc:none -page 842x595 a.pdf
etc., without creating an empty text file. @chbrown noticed that this creates a smaller pdf file.
"xc:" means "X Constant Image" but could really be thought of as "x canvas". It's a way to specify a single block of a color, in this case none. More info at http://imagemagick.org/Usage/canvas/#solid which is the "de facto" manual for ImageMagick. [supplemented with information from pipe] (Things like pdf:a
can be used to explicitly declare the format of a file. label:'some text'
, gradient:
, rose:
and logo:
seem to be other examples of special file formats.)
Anko suggested posting this modification as a separate answer, so I am doing it.
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다