Page 1 of 1

PDF Resolution??

Posted: Tue Sep 30, 2014 12:35 am
by cusmith
Here's my code

Code: Select all

		Using oGdPicturePDF As New GdPicturePDF
			oGdPicturePDF.NewPDF()

			For ImageIndex As Integer = 0 To pDocument.Count - 1
				Dim myFileName As String = pDocument(ImageIndex)

				Using oGdPictureImaging As New GdPictureImaging
					Dim ImageID As Integer = oGdPictureImaging.CreateGdPictureImageFromFile(myFileName)

					If ImageID = 0 Then
						oGdPictureImaging.ReleaseGdPictureImage(ImageID)
						oGdPicturePDF.CloseDocument()
						Return False
					Else
						oGdPicturePDF.AddImageFromGdPictureImage(ImageID, False, True)
						If oGdPicturePDF.GetStat() <> GdPictureStatus.OK Then
							oGdPicturePDF.CloseDocument()
							oGdPictureImaging.ReleaseGdPictureImage(ImageID)
							Return False
						End If
					End If

					oGdPictureImaging.ReleaseGdPictureImage(ImageID)

				End Using

			Next

			oGdPicturePDF.SaveToFile(pFileSavePath)
			If oGdPicturePDF.GetStat() <> GdPictureStatus.OK Then
				oGdPicturePDF.CloseDocument()
				Return False
			End If

			oGdPicturePDF.CloseDocument()
		End Using
The oGdPictureImaging image is a tiff scanned at 300dpi. If I check the Horizontal and Vertical resolution of oGdPictureImaging after the image has loaded, it tells me 300dpi but when the PDF that I'm creating gets saved, there's no way 300dpi was used...it looks more like 96dpi.

Question 1: How do I check the PDF Resolution?
Question 2: How do i tell the NEW PDF to use the higher resolution?

I'm creating an application that will open these PDF's later and read a Barcode that's been embedded but the default PDF's resolution is so low the barcode reader fails every time.

Any help you can offer would be very much appreciated!

-Curtis

Re: PDF Resolution??

Posted: Thu Oct 16, 2014 12:12 pm
by SamiKharma
Hi,

Question 1: How do I check the PDF Resolution?
There is no such thing as PDF resolution. If a PDF has an embedded image that image can have a resolution. But the PDF itself does not.

Question 2: How do i tell the NEW PDF to use the higher resolution?
There is no answer because of answer to 1.

Could you please attach the image and the pdf?

Best,
Sami