I'm extracting pages to a JPG image (using the JSObject), however I want to know the Height and Width (in inches) of the Page before I extract it (so I can store it for later use).
I can get the X and Y in pixels, but need to know the DPI of the document. I know that the standard normally is 72 (so just oPage.GetSize.x / 72 should equal the width in inches), however, I could have sworn I've seen some documents (that I created) with other DPI settings.
Is there a way to determine the current DPI setting of the page/document?
Dim oDoc As New Acrobat.AcroPDDoc
Dim oApp As New Acrobat.AcroApp
If oDoc.Open("test.pdf") Then
Dim oJS As Object = oDoc.GetJSObject()
Dim oPage As Acrobat.AcroPDPage
oPage = oDoc.AcquirePage(0)
Dim oSize As Object
oSize = oPage.GetSize
' HOW DO I DETERMINE THE DPI IN ORDER TO GET THE SIZE IN INCHES?
oJS.SaveAs("c:\temp\test.jpg", "com.adobe.acrobat.jpeg", True)