> 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/core/conversion/convert-multiple.md).

# Convert multiple file types to PDF on Server/Desktop

Convert various formats to PDF with ease using PDF Converter. Explore supported file formats and access full sample code for direct, high-quality conversion between PDF, XPS, SVG, TIFF, and more. The

To convert different formats to PDF Documents.

{% hint style="info" %}
See all supported formats here: [Supported File Formats ](/core/learn-more/file-format-support/format-desktop.md).
{% endhint %}

{% tabs %}
{% tab title="C#" %}
{% code lineNumbers="true" %}

```csharp
// Start with a PDFDoc (the conversion destination)
PDFDoc doc = new PDFDoc();

// perform the conversion with no optional parameters
Convert.ToPdf(doc, filename);
```

{% endcode %}
{% endtab %}

{% tab title="C++" %}
{% code lineNumbers="true" %}

```cpp
// Start with a PDFDoc (the conversion destination)
PDFDoc doc;

// perform the conversion with no optional parameters
Convert::ToPdf(doc, filename);
```

{% endcode %}
{% endtab %}

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

```go
// Start with a PDFDoc (the conversion destination)
doc := NewPDFDoc()

// perform the conversion with no optional parameters
ConvertToPdf(doc, filename)
```

{% endcode %}
{% endtab %}

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

```java
// Start with a PDFDoc (the conversion destination)
PDFDoc doc = new PDFDoc();

// perform the conversion with no optional parameters
Convert.toPdf(doc, filename);
```

{% endcode %}
{% endtab %}

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

```js
async function main() {
  const doc = await PDFNet.PDFDoc.create();

  // perform the conversion with no optional parameters
  await PDFNet.Convert.toPdf(doc, filename);
}
PDFNet.runWithCleanup(main);
```

{% endcode %}
{% endtab %}

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

```kotlin
// Start with a PDFDoc (the conversion destination)
val doc = PDFDoc()

// perform the conversion with no optional parameters
Convert.toPdf(doc, filename)
```

{% endcode %}
{% endtab %}

{% tab title="Obj-C" %}
{% code lineNumbers="true" %}

```objc
// Start with a PDFDoc (the conversion destination)
PTPDFDoc* doc = [[PTPDFDoc alloc] init];

// perform the conversion with no optional parameters
[PTConvert ToPdf:doc in_filename:filename];
```

{% endcode %}
{% endtab %}

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

```swift
// Start with a PDFDoc (the conversion destination)
let doc: PTPDFDoc = PTPDFDoc()

// perform the conversion with no optional parameters
PTConvert.toPdf(doc, in_filename: filename)
```

{% endcode %}
{% endtab %}

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

```php
// Start with a PDFDoc (the conversion destination)
$doc = new PDFDoc();

// perform the conversion with no optional parameters
Convert::ToPdf($doc, $filename);
```

{% endcode %}
{% endtab %}

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

```python
# Start with a PDFDoc (the conversion destination)
doc = PDFDoc()

# perform the conversion with no optional parameters
Convert.ToPdf(doc, filename)
```

{% endcode %}
{% endtab %}

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

```ruby
# Start with a PDFDoc (the conversion destination)
doc = PDFDoc.new()

# perform the conversion with no optional parameters
Convert.ToPdf(doc, filename)
```

{% endcode %}
{% endtab %}

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

```vb
' Start with a PDFDoc (the conversion destination)
Dim doc As PDFDoc = New PDFDoc

' perform the conversion with no optional parameters
Convert.ToPdf(doc, filename)
```

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

[PDF Converter (SVG, XPS, TIFF, JPG, RTF, TXT, More)](/core/get-started/samples/converttest.md) 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. Samples available in Python, C# (.Net), C++, Go, Java, Node.js (JavaScript), PHP, Ruby, VB


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.apryse.com/core/conversion/convert-multiple.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
