Setting and/or Modifying PageMode key in document catalog #2002
-
Hi,
and inserting individual input PDF into it afterwards. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
There are two questions:
|
Beta Was this translation helpful? Give feedback.
There are two questions:
Is there an easier way to achieve this?
doc.xref_set_key(doc.pdf_catalog(), "PageMode", "/UseOutlines")
. This does what you already have done so marvelously using string manipulation. The advantages of the method are that it (1) automatically resolves multiple nested xref sub-references, (2) automatically inserts, resp. overwrites the key (here/PageMode
) if not present, respectively already there. …