pdfutil

package
v3.0.0-...-55e877b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 29, 2023 License: GPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NormalizePage

func NormalizePage(page *_gb.PdfPage) error

NormalizePage performs the following operations on the passed in page:

  • Normalize the page rotation. Rotates the contents of the page according to the Rotate entry, thus flattening the rotation. The Rotate entry of the page is set to nil.
  • Normalize the media box. If the media box of the page is offsetted (Llx != 0 or Lly != 0), the contents of the page are translated to (-Llx, -Lly). After normalization, the media box is updated (Llx and Lly are set to 0 and Urx and Ury are updated accordingly).
  • Normalize the crop box. The crop box of the page is updated based on the previous operations.

After normalization, the page should look the same if openend using a PDF viewer. NOTE: This function does not normalize annotations, outlines other parts that are not part of the basic geometry and page content streams.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL