Hi,
I need convert a PDF to multi-page TIFF, but 2 different DPIs.
B/W => 200dpi
Color => 100dpi
Is this possible using PDFRasterizer?
Thanks you.
Convert PDF to Multipage TIFF with different DPIs
Re: Convert PDF to Multipage TIFF with different DPIs
Support · Jul 10, 2020Hello,
You can create color or monochrome (black and white) multipage tiff images using DynamicPDF Rasterizer. Below are code samples:
// Code to create a color multipage TIFF image
PdfRasterizer rastObj = new PdfRasterizer(@"Input PDF file path");
string output = @"Output Tiff file path";
// Set the images DPI
DpiImageSize imageSizeObj = new DpiImageSize(100, 100);
TiffImageFormat oTiffImageFormat = new TiffImageFormat(TiffColorFormat.Rgb);
rastObj.DrawToMultiPageTiff(output, oTiffImageFormat, imageSizeObj);
//Code to create a black and white multipage TIFF image
PdfRasterizer rastObj = new PdfRasterizer(@"Input PDF file path");
string output = @"Output Tiff image file path";
// Set the images DPI
DpiImageSize imageSizeObj = new DpiImageSize(200, 200);
TiffMonochromeColorFormat tiffColorFormat = new TiffMonochromeColorFormat(TiffMonochromeCompressionType.CcitGroup4);
TiffImageFormat oTiffImageFormat = new TiffImageFormat(tiffColorFormat);
rastObj.DrawToMultiPageTiff(output, oTiffImageFormat, imageSizeObj);
Thanks,
ceTe Software Support Team
Re: Convert PDF to Multipage TIFF with different DPIs
Forum member · Jul 10, 2020Thank you.
But is there a way from the Input PDF file, I can identify if it is a colored page then create colored TIFF with 100DPI else create a B/W TIFF with 200DPI?
Since my input PDF will have both kind of pages.
Re: Convert PDF to Multipage TIFF with different DPIs
Support · Jul 10, 2020Hello,
We don't have this functionality built in, but you could use Rasterizer to create a color rasterization of each page and sample it for color values. You could probably do this at a lower resolution for added efficiency.
Thanks,
ceTe Software Support Team