我有一个 PDF 文档,其布局使得每个单独的页面都是独立的页面,例如:
--------
| |
| |
| 1 |
| |
| |
--------
--------
| |
| |
| 2 |
| |
| |
--------
--------
| |
| |
| 3 |
| |
| |
--------
ETC。
我想知道如何才能使 PDF 本身拥有并排的两个页面,而无需使用 Acrobat 等工具来修改 PDF 的视图,例如:
-------- --------
| | | |
| | | |
| 1 | | 2 |
| | | |
| | | |
-------- --------
-------- --------
| | | |
| | | |
| 3 | | 4 |
| | | |
| | | |
-------- --------
-------- --------
| | | |
| | | |
| 5 | | 6 |
| | | |
| | | |
-------- --------
我想这样做以便永久修改 PDF。我在 macOS Monterey 上。
任何帮助,将不胜感激。
答案1
答案2
问题是,它没有横向打印功能,这里有一个更好的解决方案,即 AppleScript(适用于 Mac)。它将每个(不)均匀的页面放大到宽度的两倍,并将后续页面作为水印放在该区域。如果您希望第一页保持单页,请选择“带封面”:
打开 removed_file 时
set file_path to POSIX path of dropped_file
set AppleScript's text item delimiters to ".pdf"
set convert_path to every text item of file_path
set AppleScript's text item delimiters to "_doublesided.pdf"
set save_path to convert_path as string
set AppleScript's text item delimiters to ""
tell application "Adobe Acrobat"
activate
open file_path
set page_count to number of pages of document 1
tell page 2
set page_cbox to crop box
set new_value_1 to 1st item of page_cbox as integer
set new_value_2 to 2nd item of page_cbox as integer
set old_value_3 to 3rd item of page_cbox as integer
set new_value_4 to 4th item of page_cbox as integer
set new_value_3 to (2 * old_value_3)
end tell
set cover_type to button returned of (display dialog "Bitte wählen:" buttons {"Without Cover", "With Cover"} default button 2)
if cover_type is false then
error number -128 (* user cancelled *)
else if cover_type is equal to "With Cover" then
set loop_start to 1
set loop_end to ((page_count - 1) / 2 - 0.5) as integer
else if cover_type is equal to "Without Cover" then
set loop_start to 0
set loop_end to ((page_count) / 2 - 0.5) as integer
end if
repeat with actual_page from loop_start to loop_end - 1
set script_set_media to "this.setPageBoxes('Media'," & actual_page & "," & actual_page & ",[" & new_value_1 & "," & new_value_2 & "," & new_value_3 & "," & new_value_4 & "]);"
set script_set_crop to "this.setPageBoxes('Crop'," & actual_page & "," & actual_page & ",[" & new_value_1 & "," & new_value_2 & "," & new_value_3 & "," & new_value_4 & "]);"
set script_set_bleed to "this.setPageBoxes('Bleed'," & actual_page & "," & actual_page & ",[" & new_value_1 & "," & new_value_2 & "," & new_value_3 & "," & new_value_4 & "]);"
set script_set_trim to "this.setPageBoxes('Trim'," & actual_page & "," & actual_page & ",[" & new_value_1 & "," & new_value_2 & "," & new_value_3 & "," & new_value_4 & "]);"
set script_set_art to "this.setPageBoxes('Art'," & actual_page & "," & actual_page & ",[" & new_value_1 & "," & new_value_2 & "," & new_value_3 & "," & new_value_4 & "]);"
set script_add_watermark to "this.addWatermarkFromFile({cDIPath: this.path, nSourcePage: " & actual_page + 1 & ", nStart: " & actual_page & ", nEnd: " & actual_page & ", nHorizAlign: 0, nVertAlign: 0, nHorizValue: " & old_value_3 & ", nVertValue: 0, nOpacity: 1, nRotation: 0, bOnTop: true});"
set script_this_delete to "this.deletePages(" & actual_page + 1 & "," & actual_page + 1 & ");"
do script script_set_media
do script script_set_crop
do script script_set_bleed
do script script_set_trim
do script script_set_art
delay 0.5
do script script_add_watermark
delay 0.5
do script script_this_delete
end repeat
save active doc to save_path
close active doc saving no
end tell
结束打开