Hi,
I'm developping a program to convert multi-page tiff image to PDF document. Here is my code :
Public Sub TraitementConversion(ByVal inPathFileIn As String, ByVal inPathFileOut As String, ByVal inSize As Integer, ByVal inOrientation As Integer)
' Create a TiffFile object from the TIFF image
Dim lTiff As TiffFile = New TiffFile(inPathFileIn)
' Create a MyDocument object from the file
Dim MyDocument As Document = New ceTe.DynamicPDF.Document
Dim page As Page
Dim pagesize As PageSize = inSize
Dim pageorientation As PageOrientation = inOrientation
Dim dimension As New PageDimensions(pagesize, pageorientation)
For i As Integer = 1 To lTiff.Images.Count
page = lTiff.Images(i - 1).GetPage()
page.Dimensions = dimension
MyDocument.Pages.Add(page)
Next
MyDocument.Draw(inPathFileOut)
End Sub
After the conversion, another program called Xpdf (http://www.foolabs.com/xpdf/) is not able to convert the generated PDF in PostScript. I suspect that the PDF generated with your software add a security signature that disallow any further conversion on the file. Is it right? If not, I would appreciate your point of view on that problem.
Thanks
Tiff to PDF : PDF looks corrupted
Re: Tiff to PDF : PDF looks corrupted
Support · Jul 9, 2009Hello,
The PDF documents generated using our products are valid and fully compliant with the PDF specifications. We can however take a look at the output PDF and see if there is anything that may be causing the error?
We would recommend you to contact vendor of the "xpdf" product and see if they have any updates that addresses the error you are receiving.
If you want, send the PDF document to our [^a|mailto:support@cete.com|opennewwindow|Support Team^] and they can take a look at it.
Thanks,
ceTe Software Support Team
Re: Tiff to PDF : PDF looks corrupted
Forum member · Jul 10, 2009We found that the problem was from the TIFF file.
Now I have another question. The code above streches the image to the right dimensions. I'd like to conserve the same ratio as the original image when setting the dimensions. For exemple, a Landscape picture that would be converted to a USLETTER portrait PDF should keep its landscape aspect even on the portrait format, with blank over and/or under.
Thanks for the help.
Re: Tiff to PDF : PDF looks corrupted
Support · Jul 10, 2009Hello,
If you add the image using the Image
page element to the page by specifying the X, Y coordinates for the image it will add the image as is. There will be no changes in the size of the image. You can also set the scale to the image but the height and width ratio will be same.
If this does not work for your requirement then please be more specific about your requirement so that we can help you further.
Thanks,
ceTe Software Support Team.
Re: Tiff to PDF : PDF looks corrupted
Forum member · Jul 10, 2009It's working, thank you!