Convert PDF to multiple file types in Android

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.

1PDFDoc doc = new PDFDoc(filename);
2
3// Convert PDF document to SVG
4Convert.toSvg(doc, output_filename + ".svg");
5
6// Convert PDF document to XPS
7Convert.toXps(filename, output_filename + ".xps");
8
9// Convert PDF document to multipage TIFF
10Convert.TiffOutputOptions tiff_options = new Convert.TiffOutputOptions();
11tiff_options.SetDPI(200);
12tiff_options.SetDither(true);
13tiff_options.SetMono(true);
14Convert.toTiff(filename, output_filename + ".tiff", tiff_options);
15
16// Convert PDF to XOD
17Convert.toXod(filename, output_filename + ".xod");
18
19// Convert PDF to HTML
20Convert.toHtml(filename, output_filename + ".html");
21
22PDFDraw draw = new PDFDraw();
23Page pg = doc.getPage(1);
24
25// Convert the first PDF page to PNG
26draw.export(pg, output_filename + ".png");
27
28// Convert the first PDF page to JPEG
29draw.export(pg, output_filename + ".jpg", "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