Impressプレゼンテーションで生成されたPDFファイルがあります。 pdfをpng画像に変換して追加し、それを使ってビデオを作成したいと思います。 pdftoppmを使用してpdfをpngに変換していますが、エクスポートした画像サイズは1654x931ピクセルです。私のビデオはその解像度で表示されるため、1920x1080が必要です。
私が使用するコマンドは次のとおりです。
pdftoppm -png report.pdf report
Impressでは、エクスポートしたPDFのサイズを設定する設定やpng変換のサイズを設定する設定が見つかりませんでした。
生成されたpngのサイズを変更する方法はありますか?
ベストアンサー1
pdftoppm
次の拡張オプションが利用できるようです。
-scale-to number Scales the long side of each page (width for landscape pages, height for portrait pages) to fit in scale-to pixels. The size of the short side will be determined by the aspect ratio of the page. -scale-to-x number Scales each page horizontally to fit in scale-to-x pixels. If scale-to-y is set to -1, the vertical size will determined by the aspect ratio of the page. -scale-to-y number Scales each page vertically to fit in scale-to-y pixels. If scale-to-x is set to -1, the horizontal size will determined by the aspect ratio of the page.
1654x931と1920x1080は、本質的に16:9の同じ縦横比を持っているので、-scale-to
長辺を1920ピクセルに設定すれば十分です。
pdftoppm -png -scale-to 1920 report.pdf report
それ以外の場合は、xとyのサイズを明示的に設定できます。
pdftoppm -png -scale-to-x 1920 -scale-to-y 1080 report.pdf report