officefileapi-devexpress-dot-pdf-dot-pdfgraphics-dot-addtopageforeground-x28-devexpress-dot-pdf-dot-pdfpage-x29.md
Adds graphics to a PDF page foreground.
Namespace : DevExpress.Pdf
Assembly : DevExpress.Pdf.v25.2.Drawing.dll
NuGet Package : DevExpress.Pdf.Drawing
public void AddToPageForeground(
PdfPage page
)
Public Sub AddToPageForeground(
page As PdfPage
)
| Name | Type | Description |
|---|---|---|
| page | PdfPage |
A PdfPage object that is the page in the document where graphics are drawn (measured in points - 1/72 of an inch).
|
The overloaded AddToPageForeground method automatically converts world coordinates to page coordinates. See Coordinate Systems to learn more.
Call the AddToPageForeground method to draw graphics as the foreground of the page. The default DPI is equal to 96. To draw graphics as the background of the page content, call the PdfGraphics.AddToPageBackground method.
The following code snippets (auto-collected from DevExpress Examples) contain references to the AddToPageForeground(PdfPage) method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
pdf-document-api-highlight-search-results/CS/HighlightSearchResults/Program.cs#L55
}
graphics.AddToPageForeground(result.Page);
}
pdf-document-api-generate-document-layout/CS/DocumentCreationAPI/Program.cs#L67
graphics.AddToPageForeground(page);
}
office-file-api-ai-implementation/CS/BusinessObjects/Helpers.cs#L233
graphics.DrawString(text, font, textBrush, rectangle);
graphics.AddToPageForeground(page);
}
pdf-document-api-highlight-search-results/VB/HighlightSearchResults/Program.vb#L47
Next
graphics.AddToPageForeground(result.Page)
End Using
pdf-document-api-generate-document-layout/VB/DocumentCreationAPI/Program.vb#L68
End Using
graphics.AddToPageForeground(page)
End Using
See Also