Skip to content

BeginContainer crashes when XGraphics was created from a pdf page #123

Open
@fsc-sma

Description

@fsc-sma

Actual Behavior

With PDFsharp-GDI 6.1.0 the following code crashes:

var pdfDocument = new PdfDocument();
var pdfPage = pdfDocument.AddPage();

var xGraphics = XGraphics.FromPdfPage(pdfPage);
var container = xGraphics.BeginContainer();
xGraphics.EndContainer(container);

Stacktrace:

System.InvalidOperationException : _gfx
   at PdfSharp.Drawing.XGraphics.BeginContainer(XRect dstrect, XRect srcrect, XGraphicsUnit unit)
   at PdfSharp.Drawing.XGraphics.BeginContainer()

Expected Behavior

It should be possible to use containers when XGraphics was created from a pdf page.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions