Convert PDF to multiple file types on iOS

To convert PDF documents to different format types.

Internet connection is not required for conversion.

Convert PDF to DOCX, DOC, HTML, SVG, TIF, PNG, JPEG, XPS, EPUB, TXT, and many other formats.

1PTPDFDoc* doc = [[PTPDFDoc alloc] initWithFilepath:filename];
2
3// Convert PDF document to SVG
4[PTConvert ToSvgWithPDFDoc:doc in_filename:output_filename in_options:nil];
5
6// Convert PDF document to XPS
7[PTConvert ToXpsWithFilename:filename in_outputFilename:output_filename options:nil];
8
9// Convert PDF document to multipage TIFF
10PTTiffOutputOptions* tiff_options = [[PTTiffOutputOptions alloc] init];
11[tiff_options SetDPI:200];
12[tiff_options SetDither:true];
13[tiff_options SetMono:true];
14[PTConvert ToTiff:filename out_path:output_filename options:tiff_options];
15
16// Convert PDF to XOD
17[PTConvert ToXodWithFilename:filename out_filename:output_filename options:nil];
18
19// Convert PDF to HTML
20[PTConvert ToHtmlWithFilename:filename out_filename:output_filename options:nil];
21
22PTPDFDraw *draw = [[PTPDFDraw alloc] init];
23PTPage *pg = [doc GetPage: 1];
24
25// Convert the first PDF page to PNG
26[draw Export:pg filename:output_filename format: @"PNG"];
27
28// Convert the first PDF page to JPEG
29[draw Export:pg filename:output_filename format: @"JPEG"];

PDF Converter (SVG, XPS, TIFF, JPG, RTF, TXT, More)
Full sample code which shows how to use PDFNet Convert for direct, high-quality conversion between PDF, XPS, EMF, SVG, TIFF, PNG, JPEG, and other image formats.

Did you find this helpful?

Trial setup questions?

Ask experts on Discord

Need other help?

Contact Support

Pricing or product questions?

Contact Sales