Getting PDF DPI
Getting PDF DPI
Hi,
I want to know DPI of PDF file? Is there any function in PDFreader to get DPI of a file at which it was written?
charu
I want to know DPI of PDF file? Is there any function in PDFreader to get DPI of a file at which it was written?
charu
Re: Getting PDF DPI
Hi,
Yes, check this code:
Yes, check this code:
Code: Select all
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim oGdPictureImaging As New GdPicture.GdPictureImaging
oGdPictureImaging.SetLicenseNumber("XXX") 'Replace XXX by valid commercial or demo KEY
Dim hPDF As Integer = oGdPictureImaging.PdfReaderLoadFromFile("c:\test.pdf")
If hPDF > 0 Then
oGdPictureImaging.PdfReaderSelectPage(hPDF, 1) 'Select Page1
Dim ImageCount As Integer = oGdPictureImaging.PdfReaderGetImageCount(hPDF)
For i As Integer = 1 To ImageCount
Dim ImageID As Integer = oGdPictureImaging.PdfReaderExtractImage(hPDF, i)
If ImageID <> 0 Then
MsgBox("Image No: " + Str(i) + Chr(13) + _
"Res X: " + Str(oGdPictureImaging.GetHorizontalResolution(ImageID)) + Chr(13) + _
"Res Y: " + Str(oGdPictureImaging.GetVerticalResolution(ImageID)) + Chr(13))
oGdPictureImaging.ReleaseGdPictureImage(ImageID)
End If
Next
oGdPictureImaging.PdfReaderCloseDocument(hPDF)
End If
End Sub
Re: Getting PDF DPI
Hello,
How do i that same (Getting PDF DPI) in 8.5.33 version.
Because i am getting error when use your code on that version
How do i that same (Getting PDF DPI) in 8.5.33 version.
Because i am getting error when use your code on that version
Who is online
Users browsing this forum: No registered users and 1 guest