Back to Devexpress

PdfDocumentProcessor.CreateGraphicsPageSystem() Method

officefileapi-devexpress-dot-pdf-dot-pdfdocumentprocessor-ec6411f0.md

latest3.5 KB
Original Source

PdfDocumentProcessor.CreateGraphicsPageSystem() Method

Creates a new instance of the PdfGraphics object that uses the page coordinate system to draw on a PDF document.

Namespace : DevExpress.Pdf

Assembly : DevExpress.Docs.v25.2.dll

NuGet Package : DevExpress.Document.Processor

Declaration

csharp
public PdfGraphics CreateGraphicsPageSystem()
vb
Public Function CreateGraphicsPageSystem As PdfGraphics

Returns

TypeDescription
PdfGraphics

A PdfGraphics object used as a drawing context.

|

The following code snippets (auto-collected from DevExpress Examples) contain references to the CreateGraphicsPageSystem() 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#L46

csharp
{
    using (PdfGraphics graphics = processor.CreateGraphicsPageSystem())
    {

pdf-document-api-generate-document-layout/CS/DocumentCreationAPI/Program.cs#L57

csharp
var watermarkSize = page.CropBox.Width * 0.75;
using (PdfGraphics graphics = documentProcessor.CreateGraphicsPageSystem()) {
    SizeF stringSize = graphics.MeasureString(text,font);

pdf-document-api-highlight-search-results/VB/HighlightSearchResults/Program.vb#L39

vb
Private Shared Sub HighlightResultWithGraphics(ByVal processor As PdfDocumentProcessor, ByVal result As PdfTextSearchResults)
    Using graphics As PdfGraphics = processor.CreateGraphicsPageSystem()
        For i As Integer = 0 To result.Rectangles.Count - 1

pdf-document-api-generate-document-layout/VB/DocumentCreationAPI/Program.vb#L58

vb
Dim watermarkSize = page.CropBox.Width * 0.75
Using graphics As PdfGraphics = documentProcessor.CreateGraphicsPageSystem()
    Dim stringSize As SizeF = graphics.MeasureString(Text, font)

See Also

PdfDocumentProcessor Class

PdfDocumentProcessor Members

DevExpress.Pdf Namespace