> For the complete documentation index, see [llms.txt](https://docs.apryse.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.apryse.com/android/conversion/convert-pdf.md).

# Convert PDF to multiple file types in Android

Convert PDF documents to various formats without an internet connection. Easily convert PDF to DOCX, HTML, SVG, TIF, PNG, and more with PDF Converter. Access full sample code for direct, high-quality

To convert PDF documents to different format types.

{% hint style="info" %}
Internet connection is not required for conversion.
{% endhint %}

{% hint style="info" %}
Convert PDF to DOCX, DOC, HTML, SVG, TIF, PNG, JPEG, XPS, EPUB, TXT, and many other formats.
{% endhint %}

{% tabs %}
{% tab title="Java" %}
{% code lineNumbers="true" %}

```java
PDFDoc doc = new PDFDoc(filename);

// Convert PDF document to SVG
Convert.toSvg(doc, output_filename + ".svg");

// Convert PDF document to XPS
Convert.toXps(filename, output_filename + ".xps");

// Convert PDF document to multipage TIFF
Convert.TiffOutputOptions tiff_options = new Convert.TiffOutputOptions();
tiff_options.SetDPI(200);
tiff_options.SetDither(true);
tiff_options.SetMono(true);
Convert.toTiff(filename, output_filename + ".tiff", tiff_options);

// Convert PDF to XOD
Convert.toXod(filename, output_filename + ".xod");

// Convert PDF to HTML
Convert.toHtml(filename, output_filename + ".html");

PDFDraw draw = new PDFDraw();
Page pg = doc.getPage(1);

// Convert the first PDF page to PNG
draw.export(pg, output_filename + ".png");

// Convert the first PDF page to JPEG
draw.export(pg, output_filename + ".jpg", "JPEG");
```

{% endcode %}
{% endtab %}

{% tab title="Kotlin" %}
{% code lineNumbers="true" %}

```kotlin
val doc = PDFDoc(filename)

// Convert PDF document to SVG
Convert.toSvg(doc, output_filename + ".svg")

// Convert PDF document to XPS
Convert.toXps(filename, output_filename + ".xps")

// Convert PDF document to multipage TIFF
Convert.TiffOutputOptions tiff_options = new Convert.TiffOutputOptions()
tiff_options.SetDPI(200)
tiff_options.SetDither(true)
tiff_options.SetMono(true)
Convert.toTiff(filename, output_filename + ".tiff", tiff_options)

// Convert PDF to XOD
Convert.toXod(filename, output_filename + ".xod")

// Convert PDF to HTML
Convert.toHtml(filename, output_filename + ".html")

val draw = PDFDraw()
val pg = doc.getPage(1)

// Convert the first PDF page to PNG
draw.export(pg, output_filename + ".png")

// Convert the first PDF page to JPEG
draw.export(pg, output_filename + ".jpg", "JPEG")
```

{% endcode %}
{% endtab %}
{% endtabs %}

[PDF Converter (SVG, XPS, TIFF, JPG, RTF, TXT, More)](/android/get-started/samples.md#convert) 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.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.apryse.com/android/conversion/convert-pdf.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
