Flatten the transparency of pages in a document.




void Flatten(Doc doc)
void Flatten(Pages pages)
void Flatten(Page page)

[Visual Basic]
Sub Flatten(doc As Doc)
Sub Flatten(pages As Pages)
Sub Flatten(page As Page)

Throws Exceptions may throw Exception()



Name Description
doc The document containing transparency to be flattened.
pages The pages whose transparency is to be flattened as referenced by a Pages IndirectObject.
page The page whose transparency is to be flattened as referenced by a Page IndirectObject.




Flattens the transparent objects on pages in the document.

When transparent objects overlap other objects, all or a portion of the overlapped object shows through. Flatten will create new objects that represent the portion of the two objects that overlap. Portions of transparent objects that do not overlap other objects are composited with the backdrop color (white) to create a fully opaque object that appears the same.

Note that this feature is only available under the ABCpdf Professional License.




Here we flatten all the transparent objects in a document.


FlattenTransparencyOperation transOp = new FlattenTransparencyOperation(); transOp.DotsPerInch = 144; transOp.ColorSpace = XRendering ColorSpaceType.Rgb; Doc doc = new Doc(); doc.Read(Server.MapPath("../mypics/sample.pdf")); transOp.Flatten(doc); doc.Save(Server.MapPath("Flattened.pdf"));