0

I have a PDF document that is laid out such that each individual page is its own page, like:

--------
|      |
|      |
|  1   |
|      |
|      |
--------

| | | | | 2 | | | | |



| | | | | 3 | | | | |


etc.

I am wondering how I could make it so that the pdf itself, without using a tool to modify the PDF's view like Acrobat, have two side by side pages, like:

--------  --------
|      |  |      |
|      |  |      |
|  1   |  |  2   |
|      |  |      |
|      |  |      |
--------  --------

| | | | | | | | | 3 | | 4 | | | | | | | | |



| | | | | | | | | 5 | | 6 | | | | | | | | |


I would like to do this so it permanently modifies the PDF. I am on macOS Monterey.

Any help would be appreciated.

2 Answers2

0

You could simply print it to a PDF using the built in virtual printer.

In the print settings you set "Pages per Sheet" to "2" like explained here

enter image description here

mashuptwice
  • 3,395
0

The problem witht that is, that it has no side-to-side printing, here's a better solution as an AppleScript (for Macs). It enlarges every (un)even page to twice the width and places the follow-up page as a watermark on that area. If you want the first page to remain single, choose "With Cover":

on open dropped_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

end open

Lothar
  • 1