Some test text!
To create a PDF page thumbnail in multiple image formats.
PTPDFDoc *doc = [[PTPDFDoc alloc] initWithFilepath: filename]; // set the output resolution PTPDFDraw *draw = [[PTPDFDraw alloc] initWithDpi: 92]; // Rasterize the first page in the document and save the result as PNG. PTPage* pg = [doc GetPage: 1]; [draw Export:pg filename: output_filename format: @"PNG"];
Convert PDF to image (JPG, PNG, BMP, TIFF)
Full code sample illustrates how to use the built-in rasterizer in order to render PDF images on the fly and how to save resulting images in PNG and JPEG format.
More image format options:
"RAW" : RAW format.
There are four possibilities:
e_rgba- if transparent and color page;
e_gray_alpha- if transparent and gray page;
e_rgb- if opaque and color page;
e_gray- if opaque and gray page. NOTE that if page is set to be transparent (SetPageTransparent), the output color channels are already multiplied by the alpha channel.
Get the answers you need: Support
Get unlimited trial usage of PDFTron SDK to bring accurate, reliable, and fast document processing capabilities to any application or workflow.
Select a platform to get started with your free trial.
Unlimited usage. No email address required.
Join our upcoming webinar to learn about how to collaborate on videos frame by frame directly in your browserSave your seat