How to convert PDF document into TIFF.

            using Apitron.PDF.Rasterizer;
            using Apitron.PDF.Rasterizer.Configuration;
            ...
            // open and load the file
            using (FileStream fs = new FileStream(@"..\..\..\Documents\testfile.pdf", FileMode.Open), fsOut = File.Create("out.tiff"))
            {
                // this object represents a PDF document
                Document document = new Document(fs);

                // save to tiff using CCIT4 compression, black and white tiff.
                // set the DPI to 144.0 for this sample, so twice more than default PDF dpi setting.
                TiffRenderingSettings tiffRenderingSettings = new TiffRenderingSettings(TiffCompressionMethod.LZW, 144, 144);

                document.SaveToTiff(fsOut, tiffRenderingSettings);

                Process.Start("out.tiff");
            }
        

Back to List