LEADTOOLS Support
Imaging
Imaging SDK Questions
Invalid output tiff file while converting from PDF to tiff using Leadtools.Pdf
This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Sunday, May 19, 2013 11:47:26 PM(UTC)
Groups: Registered
Posts: 4
When converting PDF file to an existing tiff file the output converted file has incorrect format in page number in tiff tag it always be (Page number 1 ) however it may be the second or third
#2
Posted
:
Monday, May 20, 2013 5:56:36 AM(UTC)
Groups: Registered, Tech Support
Posts: 179
Please provide me with the following:
1. Which LEADTOOLS version (17.0, 17.5, 18, etc.) you are using?
2. Which programming language are you using?
3. How exactly you convert the PDF file to TIFF image? Can you send me a code snippet?
4. Can you send me the source PDF file with the result TIFF file?
5. What are the exact steps to reproduce the problem?
Important note: If you want to attach a file, make sure to put it in a ZIP or RAR file and don't use the Preview feature. If the file is larger than 5MB, you can contact
support@leadtools.com to ask for FTP upload instructions. Also, mention this forum post in your email to support.
Mohamed Abedallah
Developer Support Engineer
LEAD Technologies, Inc.
![LEAD Logo LEAD Logo](https://www.leadtools.com/images/new-site-images/leadtools-logo-header.png)
#3
Posted
:
Monday, May 20, 2013 6:27:45 AM(UTC)
Groups: Registered
Posts: 4
i am using Leadtools 18 with C# and here's the code:
Leadtools.Codecs.RasterCodecs _codecs = new Leadtools.Codecs.RasterCodecs();
Leadtools.RasterImage PDFImage = _codecs.Load(sourcePDF);
_codecs.Save(PDFImage, outputTiff, Leadtools.RasterImageFormat.Tif, 24, 1, PDFImage.PageCount, 1, Leadtools.Codecs.CodecsSavePageMode.Append );
The problem always happen when converting a PDF file to an existing Tiff file.
and i attached sample of PDF before converting and the tiff after converting
Thanks in advance,
#4
Posted
:
Tuesday, May 21, 2013 3:43:43 AM(UTC)
Groups: Registered, Tech Support
Posts: 179
Shimaa,
Normally, you don't need to read the PageNumber tag from the TIFF file because our toolkit handles page numbering automatically. This means if you use our RasterCodecs.GetInformation() method, it will correctly give you the number of valid pages in the TIFF file. Also, our delete, replace and append functions for TIFF pages should always produce correct results for the page numbers you specify.
However, if you must read the tag yourself, keep the following information in mind:
1) The value is a zero-based index so the first page will be zero, the second will be one and so on. This is different from some of our functions, which have a one-based index value.
2) The tag contains 2 values. The first is the page number and the second value is the total number of
pages in the TIFF file.
3) The TIFF standard does not require that the second parameter to always contain a valid value. It could contain zero, which means the total number of pages in the document is not available.
Mohamed Abedallah
Developer Support Engineer
LEAD Technologies, Inc.
![LEAD Logo LEAD Logo](https://www.leadtools.com/images/new-site-images/leadtools-logo-header.png)
LEADTOOLS Support
Imaging
Imaging SDK Questions
Invalid output tiff file while converting from PDF to tiff using Leadtools.Pdf
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.