StitchPageOverlay

Page manipulation

Description

Nakłada zawartość jednej strony na inną istniejącą stronę w podanym położeniu; strona źródłowa jest przechwytywana do wektorowego Form XObject i rysowana na stronie docelowej, zachowując pełną dokładność wektorową (tekst pozostaje możliwy do zaznaczenia, ścieżki pozostają ostre) zamiast rasteryzacji

The source page is consumed in the process: it is captured and hidden, exactly like ImposePagesNUp. If the target page number is greater than the source page number, it is automatically adjusted because hiding the source shifts later pages down by one.

The Width and Height control the placement size; if their aspect ratio differs from the source page, the content is stretched. Use the page's own dimensions for a 1:1 overlay. Opacity ranges from 0 (fully transparent) to 1 (fully opaque).

Syntax

Delphi

Function TPDFlib.StitchPageOverlay(SourcePage, TargetPage: Integer; Left, Top, Width, Height, Opacity: Double): Integer;

Parameters

SourcePageThe 1-based page number whose content will be captured and overlaid (consumed and hidden afterwards)
TargetPageThe 1-based page number that receives the overlay; must differ from SourcePage
Left, TopTop-left placement of the overlaid content on the target page, in current measurement units (top-left origin)
Width, HeightRozmiar umieszczenia; należy przekazać wymiary strony źródłowej w celu nałożenia bez skalowania
OpacityWartość alfa od 0 do 1 dla nakładanej zawartości (1 = nieprzezroczysty, wartości poniżej 1 włączają przezroczystość przez ExtGState ca/CA)

Return values

0The overlay could not be performed (invalid page numbers, same source and target, or capture failure)
1The source page was captured and overlaid onto the target page