Click here to Skip to main content
15,921,276 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello everyone,

Found a source to convert PDF to TIFF but I think it has a licence (ABCpdf 6.0 .NET Professional)
Is there a free dll for this like iTextSharp. Can't find a code for converting pdf to tiff using iTextSharp.

Please Help
Thanks

Adding this to my User Control (Image Viewer)
TIFF and PDF is almost the same so I want to add PDF in Image Viewer
Posted
Updated 14-Apr-14 0:50am
v2

1 solution

Have a look here: http://stackoverflow.com/questions/10125117/convert-pdf-file-pages-to-images-with-itextsharp[^]

Quote:


You can use Ghostscript to convert the PDF files into Images, I used the following parameters to convert the needed PDF into tiff image with multiple frames :

CSS
gswin32c.exe   -sDEVICE=tiff12nc -dBATCH -r200 -dNOPAUSE  -sOutputFile=[Output].tiff [PDF FileName]


Also you can use the -q parameter for silent mode You can get more information about its output devices from here

After that I can easily load the tiff frames like the following

C#
using (FileStream stream = new FileStream(@"C:\tEMP\image_$i.tiff", FileMode.Open, FileAccess.Read, FileShare.Read))
{
    BitmapDecoder dec = BitmapDecoder.Create(stream, BitmapCreateOptions.IgnoreImageCache, BitmapCacheOption.None);
    BitmapEncoder enc = BitmapEncoder.Create(dec.CodecInfo.ContainerFormat);
    enc.Frames.Add(dec.Frames[frameIndex]);
}
 
Share this answer
 
Comments
Manas Bhardwaj 14-Apr-14 14:14pm    
Yup. iTextSharp is quite good +5!
Maciej Los 14-Apr-14 14:34pm    
Thank you, Manas ;)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900