Mirror PDFs from left to right preferably via the command line?

Is it possible to mirror a PDF page, preferably via command line?

By mirroring I don’t mean rotating it, and I don’t mean changing the colors or the page ordering

I mean mirroring the content of a page, so that it appears as if you would look at it from the back. As if it were a printed sheet of paper that is held against the light and viewed from the unprinted side.

So that the contents of the printed side shine through. abcdef would then read fedcba with the letters also inverted. It doesn’t matter if the data format is changed.


Solution 1:

cpdf (Coherent PDF) seems like exactly what you are looking for. It is a fantastic piece of command-line freeware (free for non-commercial use) which seems to be not as widely known as it should be for its amazing feature set. See https://github.com/coherentgraphics/cpdf-binaries for downloads and links to examples, their extremely comprehensive (and well-written, in my opinion) ~70-page manual, and support. Here is the command you would want (just swap out the sample paths for your use case):

cpdf -i "path_to_input_file.pdf" -hflip -o "path_to_output_file.pdf"

You can use -range to select just some pages of the input file. The reverse range will reverse the order of the pages, which may be helpful in this use case.

Note: cpdf allows for more concise syntaxes than the above, but I included the extra bits for clarity. For example, the following is also valid: cpdf path_to_input_file.pdf reverse -hflip -o path_to_output_file.pdf

Solution 2:

Several methods below, but they all involve Adobe commercial products.

Adobe Acrobat

Enter Acrobat print to the "Adobe PDF" printer, click the "Properties" button, in the "Layout" tab click on "Advanced", expand "PostScript Options" and set "Mirrored Output" to "Yes".

image

Adobe InDesign

Go to Object > Transform > Flip horizontal.

Adobe Illustrator

Go to Object > Transform > Reflect.

Adobe Photoshop or Adobe Photoshop Elements

You can open .pdf files and you can flip or mirror pages and save them as .pdf or image.