LoginSignup
1
0

More than 5 years have passed since last update.

PDF の回転を削除する

Last updated at Posted at 2019-01-13

PDF ファイルの Page rot を 0 にする方法です。

pdf_rot_omit.sh
#
TMP_PS="/tmp/tmp001.ps"
pdf2ps $1 $TMP_PS
ps2pdf $TMP_PS $2
#

実行方法

./pdf_rot_omit.sh in01.pdf out01.pdf

入力ファイルの情報

$ pdfinfo in01.pdf
(省略)
Page size:      842 x 1191 pts (A3)
Page rot:       90
(省略)

出力ファイルの情報

$ pdfinfo out01.pdf
(省略)
Page size:      1191 x 842 pts (A3)
Page rot:       0
(省略)

この手法は、codec の問題を回避するにも使えます。
下記のようなエラーが出た時です。
既存のファイルに加筆する時などに、このようなエラーが出たら、元ファイルを変換して問題を回避できます。

'charmap' codec can't encode characters in position 1-12: character maps to <undefined>
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0