Free Support Forum - aspose.com

Aspose PDF Co-ordinates system

Aspose PDF co-ordinates system is like
image.png (1.0 KB)

But I need PDF co-ordinates as par below co-ordinate system

image.png (1 KB)

Actually I am fetching out all the bookmarks from PDF and trying to get their co-ordinates. Below is the code (just need reverse co-ordinates)

        //Instantiate document object
        Aspose.Pdf.Document document = new Aspose.Pdf.Document(PsDocument);

        // Create PdfBookmarkEditor
        PdfBookmarkEditor bookmarkEditor = new PdfBookmarkEditor();

        // Open PDF file
        bookmarkEditor.BindPdf(document);

        // Extract bookmarks
        Aspose.Pdf.Facades.Bookmarks bookmarks = bookmarkEditor.ExtractBookmarks();
        foreach (Aspose.Pdf.Facades.Bookmark bookmark in bookmarks)
        {
            Debug.WriteLine("Title: {0}", bookmark.Title);
            Debug.WriteLine("Bottom: {0}", bookmark.PageDisplay_Bottom);
            Debug.WriteLine("Top: {0}", bookmark.PageDisplay_Top);
            Debug.WriteLine("Left: {0}", bookmark.PageDisplay_Left);
            Debug.WriteLine("Right: {0}", bookmark.PageDisplay_Right);
        }

Please suggest some way

@mhtsharma9,

The horizontal values will not change, and you can subtract vertical values from the total vertical height and ignore minus sign. If this does not help, then please send us your source PDF file. We will investigate your scenario in our environment and share our findings with you.