DynaPDF Manual - Page 571

Previous Page 570   Index   Next Page 572

Function Reference
Page 571 of 818
// set, DeviceN color spaces are left unchanged.
ofIgnoreNChannel
= 0x02000000, // If set, NChannel color spaces are left unchanged.
ofIgnoreSeparation
= 0x04000000, // If set, Separation color spaces are left unchanged.
ofFailOnOverprinting
= 0x08000000, // Meaningful only if a color conversion flag is set. If
// set, the function returns with a fatal error if an
// object with enabledoverprinting was found on the page.
// The appearance of overprinted objects would change and
// make the page maybe unusable.
// Overprinted objects can be left unchanged (set the flag
// ofSkipOverprintedObj in this case) or Optimize() can
// return with a fatal error to avoid the creation of an
// invalid document.
ofSkipOverprintedObj
= 0x10000000
// Meaningful only if a color conversion flag is set. If
// set, objects that would be rendered with enabled
// overprinting are left unchanged to avoid color errors on
// the page.
ofRemoveBatesNumbers
= 0x20000000, // Remove bates numbers if any. The type BatesN can contain
// headers / footers too.
ofRemoveHeaderFooter
= 0x40000000, // Remove headers / footers if any. This type is set if no
// bates numbering was added. To determine whether a file
// contains headers or footers call
// LoadHeaderFooterSettings().
ofIgnoreSeparationAll
= 0x80000000
// Meaningful only if a color conversion flag is set. If
// set, Separation color spaces with the special colorant
// "All" will be ignored.
}TOptimizeFlags;
struct TOptimizeParams
{
UI32
StructSize;
// Must be set to sizeof(TOptimizeParams).
UI32
Min1BitRes;
// Minimum resolution before scaling.
UI32
MinGrayRes;
// Minimum resolution before scaling.
UI32
MinColorRes;
// Minimum resolution before scaling.
UI32
Res1BitImages;
// 1 bit black & white images.
UI32
ResGrayImages;
// Gray images.
UI32
ResColorImages; // Multi-channel images.
TCompressionFilter Filter1Bit;
// Filter for black & white images.
TCompressionFilter FilterGray;
// Filter for gray images.
TCompressionFilter FilterColor;
// Filter for multi-channel images.
SI32
JPEGQuality;
// JPEG quality.
SI32
JP2KQuality;
// JPEG 2000 quality.
float
MinLineWidth;
// Zero means no hair line removal.
const UI32*
ExcludeCS;
// Array of color space handles which should be excluded from
// color conversion.
SI32
ExcludeCSCount; // Number of handles in the array. This can be a negative
// value to reverse the meaning. That means convert these
// color spaces and ignore all others.
};
The function rebuilds the content streams of all pages, templates, patterns, annotations, and form
fields. Useless operators as well as errors in content streams will be fully removed. The resulting
content streams are error free and usually smaller. How much the optimization takes effect depends
on the quality of the original content streams.
Besides content optimization it is also possible to flatten layers, scale or just re-compress images, or
to correct hairlines.
The parameter Flags is a bit mask. Multiple flags can be combined with a binary or operator, e.g.
ofInMemory | ofScaleImage.
The flag ofScaleImages will be ignored if the parameter Parms is set to NULL.
 

Previous topic: Optimize

Next topic: Usage, Re-compressing 1 bit images with JBIG2, Text to outline conversion


Start Chat