Convert PDF, Documents, and Images to TIFF
The GdPicture.NET SDK includes the GdpictureDocumentConverter class, which provides many different methods and properties for document conversion of 100+ document/image formats.
Now, let’s see how to convert any supported format to a .tiff file:
Do not forget to use the GdPictureStatus enumeration to have a following of your process and get potential errors.
As you can see in this example, we took as input a PDF, but you can select another format by just changing the path and the GdPicture14.DocumentFormat.DocumentFormatPDF in the «LoadFromFile » method.
GdPictureDocumentConverter provides two ways of saving your document as a TIFF:
- as a file, which is the path’s file: https://www.gdpicture.com/guides/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureDocumentConverter~SaveAsTIFF(String,TiffCompression).html
- into a stream: https://www.gdpicture.com/guides/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureDocumentConverter~SaveAsTIFF(Stream,TiffCompression).html
You can also change properties of your convertion in order to select the range of pages you want to convert, the amount of DPIs, if you want to keep or not the annotations within the converted document, and more.
For example, this is how you change the DPIs of the output TIFF:
gdpictureDocumentConverter.RasterizationDPI = 300;
You will find all the properties here.