Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chain ¶
type Chain struct {
// contains filtered or unexported fields
}
Chain allows to use sequence of optimizers. It implements interface model.Optimizer.
type CleanContentstream ¶
type CleanContentstream struct { }
CleanContentstream cleans up redundant operands in content streams, including Page and XObject Form contents. This process includes: 1. Marked content operators are removed. 2. Some operands are simplified (shorter form). TODO: Add more reduction methods and improving the methods for identifying unnecessary operands.
type CleanFonts ¶
type CleanFonts struct { // Subset embedded fonts if encountered (if true). // Otherwise attempts to reduce the font program. Subset bool }
CleanFonts cleans up embedded fonts, reducing font sizes.
type CombineDuplicateDirectObjects ¶
type CombineDuplicateDirectObjects struct { }
CombineDuplicateDirectObjects combines duplicated direct objects by its data hash. It implements interface model.Optimizer.
type CombineDuplicateStreams ¶
type CombineDuplicateStreams struct { }
CombineDuplicateStreams combines duplicated streams by its data hash. It implements interface model.Optimizer.
type CombineIdenticalIndirectObjects ¶
type CombineIdenticalIndirectObjects struct { }
CombineIdenticalIndirectObjects combines identical indirect objects. It implements interface model.Optimizer.
type CompressStreams ¶
type CompressStreams struct { }
CompressStreams compresses uncompressed streams. It implements interface model.Optimizer.
type Image ¶
type Image struct {
ImageQuality int
}
Image optimizes images by rewrite images into JPEG format with quality equals to ImageQuality. TODO(a5i): Add support for inline images. It implements interface model.Optimizer.
type ImagePPI ¶
type ImagePPI struct {
ImageUpperPPI float64
}
ImagePPI optimizes images by scaling images such that the PPI (pixels per inch) is never higher than ImageUpperPPI. TODO(a5i): Add support for inline images. It implements interface model.Optimizer.
type ObjectStreams ¶
type ObjectStreams struct { }
ObjectStreams groups PDF objects to object streams. It implements interface model.Optimizer.
type Options ¶
type Options struct { CombineDuplicateStreams bool CombineDuplicateDirectObjects bool ImageUpperPPI float64 ImageQuality int UseObjectStreams bool CombineIdenticalIndirectObjects bool CompressStreams bool CleanFonts bool SubsetFonts bool CleanContentstream bool }
Options describes PDF optimization parameters.