6

I have a PDF file.

The pages display vertically, one after another, one at a time.

I would like the PDF to display 2 pages at a time, one page next to the other horizontally, like laying out a book flat.

Users can do this with a menu option in the PDF reader, but I would like the file to behave like that on its own, without any need for the user to do anything.

Is this possible?

One wrinkle, I am on Linux (Mint) which Adobe has forsaken. I can only use software available for Linux or a web utility.

Thanks either way.

4 Answers 4

3

Can I make a PDF file display like a book by default, without user input?

I would like the PDF to display 2 pages at a time, one page next to the other horizontally, like laying out a book flat.

Users can do this with a menu option in the PDF reader, but I would like the file to behave like that on its own, without any need for the user to do anything.

Check out How to force a PDF to open at a particular view for a potential solution which may work; just set the options for your needs (e.g. "Two-Up Continuous)") and test to confirm it works as expected.

As long as the client computer which opens the document opens it with a PDF reader application that properly reads the Initial View tag property, then this should work just fine.

How to force a PDF to open at a particular view

Today's post is about how you as the creator of a PDF can specify the opening view of that particular PDF. I always like my PDFs to open in Fit Page view, so that the recipient gets a bird's eye view of the whole page. If I've included bookmarks in the file, I want the bookmarks pane to appear on the left side of the screen so that the recipient sees and uses the bookmarks.

  1. After you've created your PDF file in InDesign, Word, QuarkXPress, or whatever, open it in Adobe Acrobat Standard or Professional (you can't use the free Adobe Reader to do the steps below).

  2. Choose File > Properties

  3. In the Document Properties dialog box, click on the Initial View tab at the top. Then set the options for Layout and Magnification as desired. Note that you can specify which Navigation Panels open at the left side of the screen, the page layout, the magnification, which page the PDF opens to, whether or not you want the Acrobat window to resize to the size of the page, whether the window should be centered on the screen, and whether or not you want the document to open in Full Screen mode (useful for presentations).

  4. Click the OK button. Nothing magnification and layout of the document will not change at this point.

  5. Save the PDF, close it, and reopen it. It should reopen with the options you specified in step three. These options will override any settings specified by the user in Preferences as described in my previous post.

source

3

Sure, that's an easy one.

In Acrobat, open the Document Properties dialog (Ctrl-D, or Cmd-D respectively), and switch to the Initial View tab.

There you locate the Page Layout dropdown, and you will see four options with Two-Up: Facing, Continuous (Facing), Cover Page, and Continuous (Cover Page).

Facing means that the first and the second page are displayed together (and so on). Cover page means that the first page is displayed single, and then the second and third page are displayed together (that's how a book would appear).

Make your selection, save the document, and there you are. Unless the user has something else set in the Preferences, the document will now open as you have intended.

3

Solution without Adobe Acrobat

Since you mentioned you use Mint, which is based on Debian GNU/Linux, you should be able to do this automatically for PDF files using the pikepdf library (apt install python3-pikepdf) and a little Python.

You just need to add /PageLayout /TwoPageRight to the root of the PDF's document tree. This can be done in Python like so:

from pikepdf import Pdf, Dictionary, Name
pdf=Pdf.open('input.pdf')
pdf.Root.PageLayout=Name('/TwoPageRight')
pdf.save('output.pdf')

But wait, it didn't work!

There's the rub. You can create a PDF which suggests the page layout, but at the time I am writing this (2021) most PDF viewers for GNU/Linux (including evince mentioned in the question) will always override it with the default user preferences.

However, if you send it to someone with Adobe Reader and they have its preferences set to Page Layout: Automatic, it will properly open like a book, with the first page on the right and all following pages side by side.

3
  • 2
    I needed to use pdf.Root.PageLayout (capitalized Root), not sure if that's a recent change, I'm using pikepdf 5.5.0. Thanks!
    – hcs
    Commented Aug 24, 2022 at 20:42
  • Thanks, @hcs. PikePDF had previously documented root as an alias for the .Root and /Root object of the PDF. Since both work on my machine, I've changed my answer to use the capitalized Root.
    – hackerb9
    Commented Aug 24, 2022 at 21:49
  • 1
    FYI, looks like it was deprecated in 2.0.0 and removed in 3.0.0.
    – hcs
    Commented Aug 25, 2022 at 22:56
-1

I don't think it is possible. Unless you make 2 pages to appear as one single page which is the only solution I can think of.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .