Flatten the transparency of pages in a document.

 

   

Syntax
 

[C#]
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()

 

   

Params
 
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.

 

   

Notes
 

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 don't 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.

 

   

Example
 

Here we flatten all the transparent objects in a document.

[C#]

FlattenTransparencyOperation transOp = new FlattenTransparencyOperation();
transOp.DotsPerInch = 144;
transOp.ColorSpace = XRendering ColorSpaceType.Rgb;

Doc theDoc = new Doc();
theDoc.Read(Server.MapPath("../mypics/sample.pdf"));
transOp.Flatten(theDoc);
theDoc.Save(Server.MapPath("../Flattened/sample.pdf"));