ImageEn, unit iexUserInteractions

TIEPdfViewer.AssignAsLayers

TIEPdfViewer.AssignAsLayers


Declaration

function AssignAsLayers(Dest: TIEView; Append: Boolean = False; ImproveLayout: Boolean = True; Scaling: Double = -1.0; LimitToType: TPdfObjectType = ptUnknown): Integer;


Description

Assigns the objects in the current page as ImageEn layers in another TImageEnView.

Parameter Description
Dest A TImageEnView to assign the layers to
Append If true, any existing layers in Dest will not be cleared. If False, the background image of Dest will be sized to current page size
ImproveLayout When enabled tweaks are applied to improve styling and fix quirks related to PDF importing (see detail below)
Scaling Enables the output to be scaled relative to the PDF DPI of 72. If -1 is specified the the scaling of the default DPI is used
LimitToType If not ptUnknown, only objects of the specified type are imported. Valid values are ptText, ptPath, ptImage

Result is -1 in the case of an error, otherwise returns the number of layers added.

Importing from PDF
ImageEn will import the following PDF Object types:
 Images: Imported as a TIEImageLayer. Transparency may be lost for some PDF image types
 Text: Imported as a TIETextLayer. Fonts that are unavailable on the system will be substituted. Font sizes may not be correct
 Paths: Imported as a TIEPolylineLayer, or TIELineLayer if only two points. Bezier curves will be treated as lines, Alternate and Winding fills are treated as explicitly closed fills

Shading and Form objects are ignored.

ImproveLayout Effects
Enabling ImproveLayout has the following effects:
 Fully invisible objects in the PDF file (off the side of the PDF page) are not imported
 SizeToText is called when importing text to ensure text is visible
 LayersCropped is enabled to hide partially visible objects


Example

// Assign the objects in the current page as layers in ImageEnView2
ImageEnView1.PdfViewer.AssignAsLayers( ImageEnView2 );


See Also

 LayersImport