oGdPicturePDF.GetPageRotation()

Discussions about image processing and document imaging.
Post Reply
mcurtis
Posts: 3
Joined: Thu Apr 19, 2012 12:55 am

oGdPicturePDF.GetPageRotation()

Post by mcurtis » Fri Apr 20, 2012 2:12 am

We have been testing your software to replace what we currently have, only thing stopping us purchasing is auto page rotation. I have been trying to get the orientation of pages to run a rotate on. I have been trying with the ocr features but it takes too long. Came across the GetPageRotation() feature for the GdPicturePDF. I only seem to get a 0 returned for every attempt. Is this a feature that is working? If not, is there any way we can request a feature like that.

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: oGdPicturePDF.GetPageRotation()

Post by Loïc » Mon Apr 23, 2012 2:58 pm

Hello,

The GetPageRotation() method of the GdPicturePDF do not detect text orientation of the page. it returns just the rotation applied to a page during its creation.

The OCR approach can be considered too long, but unfortunately we do not have other solution so far. We make frequent research on this feature and we bring some minor optimization during our releases cycle.

Kind regards,

Loïc

mcurtis
Posts: 3
Joined: Thu Apr 19, 2012 12:55 am

Re: oGdPicturePDF.GetPageRotation()

Post by mcurtis » Mon Apr 23, 2012 6:06 pm

Thanks for the reply. I am sad to hear that there continues to be no quick way to figure page orientation.

Thanks

Mike

stanlyn
Posts: 25
Joined: Wed Mar 05, 2014 8:29 pm

Re: oGdPicturePDF.GetPageRotation()

Post by stanlyn » Sun Mar 09, 2014 3:33 am

Hi,

Has this AutoRotate() function been added since the last post, as this is a must have for automated processing. This could be a deal breaker for us...

If this is available now, what are the commands/function calls?

If now available now, when???

Thanks, Stanley

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: oGdPicturePDF.GetPageRotation()

Post by Loïc » Sun Mar 09, 2014 8:52 pm

Hello,

There is everything in GdPicture to query or auto-detect page rotation of a PDF document.

1- To obtain the page rotation entry of a PDF document the GetPageRotation() method can be used.The reference guide includes a code sample of usage.

2- To automatically detect the orientation of the page you can use rasterization or image extraction in case of Bitmap based page by using the RenderPageToGdPictureImageEx() method that will provide a GdPicture Image identifier that you will be able to pass to the OCRTesseractGetOrientation() method of the GdPcitureImaging class.

Here a sample of usage:

Code: Select all

        Dim oGdPictureImaging As New GdPictureImaging
        Dim oGdPicturePDF As New GdPicturePDF
        oGdPicturePDF.LoadFromFile("\mypdf.pdf", False)

        Dim imageID As Integer = oGdPicturePDF.RenderPageToGdPictureImageEx(200, False)
        oGdPicturePDF.CloseDocument()
        Dim rotation As Integer = oGdPictureImaging.OCRTesseractGetOrientation(imageID, "eng", "D:\GdPicture\redist\ocr")
        oGdPictureImaging.ReleaseGdPictureImage(imageID)

        oGdPictureImaging.Dispose()
        oGdPicturePDF.Dispose()

        MessageBox.Show("Page rotation: " + rotation.ToString())
Please let me know if you need further information.

With best regards,

Loïc Carrère

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest