ststeiger / PdfSharpCore

Port of the PdfSharp library to .NET Core - largely removed GDI+ (only missing GetFontData - which can be replaced with freetype2)
Other
1.05k stars 234 forks source link

Question; PDFsharpCore obtain precise positions of elements like text, images, or other content on a PDF page. #385

Open devna13 opened 11 months ago

devna13 commented 11 months ago

Is there a way to find precise position of Pdf elements (in points) in a pdf document ? I have tried this but no luck so far.

        foreach (PdfItem? content in page.Contents.Elements)
        {
            PdfSharpCore.Pdf.Advanced.PdfReference pdfContent = (PdfSharpCore.Pdf.Advanced.PdfReference)content;

            Debug.WriteLine(content.ToString());