Convert PDF to multiple file types in Xamarin

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.

C#

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