[英](How) can I set an offset when converting PDF to PCL with Ghostscript?
我需要將PDF的整個頁面內容向下移動一定距離,然后將其轉換為PCL 。
我已經找到了如何用PDF到PDF做到這一點:
PCL轉換是否有類似的東西?
現在我用以下命令轉換:
gswin32c.exe \
-q \
-dNOPAUSE \
-dBATCH \
-sDEVICE=pxlmono \
-dDuplex=false \
-dTumble=false \
-sPAPERSIZE=a4 \
-dMediaPosition=4 \
-sOutputFile="d:\out.pcl" \
-f"d:\in.pdf" \
-c \
-quit
是否有可能直接進行,或者我是否需要先將PDF中的內容轉換為PDF轉換(如鏈接的問題),然后在第二個轉換步驟中將其轉換為pcl?
我認為它不適用於直接轉換PDF => PCL。
你應該分兩步完成,然后它可以工作:
第一個命令:
gs \
-sDEVICE=pdfwrite \
-o pdf-shifted-by-1-inch-to-left-2-inches-to-top.pdf \
-g8420x5950 \
-c "<</PageOffset [-72 144]>> setpagedevice" \
-f input.pdf
第二個命令:
gs \
-sDEVICE=pxlmono \
-o pcl-output.pcl \
-sPAPERSIZE=a4 \
pdf-shifted-by-1-inch-to-left-2-inches-to-top.pdf
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.