> 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/conversion/convert-pdf-to-word.md). Agents can also search and read this documentation through its [MCP server](https://docs.apryse.com/~gitbook/mcp).

# Convert PDF to Office on Server/Desktop

Convert PDF Documents to Word, Excel, and PowerPoint formats with ease using our Structured Output module. Available on Desktop and Server (Windows, Linux, or Mac). Find installation details here! The

To convert PDF Documents to Word format.

{% hint style="warning" %}
**The Structured Output module is an optional add-on**

Only available on Desktop and Server (Windows, Linux, or Mac) You can find more details about how to install the Structured Output module [here ](https://docs.apryse.com/core/learn-more/modules.md#structured-output-module).
{% endhint %}

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

```csharp
Convert.WordOutputOptions wordOutputOptions = new Convert.WordOutputOptions();

// Optionally convert only the first page
wordOutputOptions.SetPages(1, 1);

// Requires the Structured Output module
Convert.ToWord(filename, output_filename, wordOutputOptions);
```

{% endcode %}
{% endtab %}

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

```cpp
Convert::WordOutputOptions wordOutputOptions;

// Optionally convert only the first page
wordOutputOptions.SetPages(1, 1);

// Requires the Structured Output module
Convert::ToWord(filename, output_filename, wordOutputOptions);
```

{% endcode %}
{% endtab %}

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

```go
wordOutputOptions := NewWordOutputOptions()

// Optionally convert only the first page
wordOutputOptions.SetPages(1, 1)

// Requires the Structured Output module
ConvertToWord(filename, output_filename, wordOutputOptions)
```

{% endcode %}
{% endtab %}

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

```java
Convert.WordOutputOptions wordOutputOptions = new Convert.WordOutputOptions();

// Optionally convert only the first page
wordOutputOptions.setPages(1, 1);

// Requires the Structured Output module
Convert.toWord(filename, output_filename, wordOutputOptions);
```

{% endcode %}
{% endtab %}

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

```js
async function main() {
  const wordOutputOptions = new PDFNet.Convert.WordOutputOptions();

  // Optionally convert only the first page
  wordOutputOptions.setPages(1, 1);

  // Requires the Structured Output module
  await PDFNet.Convert.fileToWord(filename, output_filename, wordOutputOptions);
}
PDFNet.runWithCleanup(main);
```

{% endcode %}
{% endtab %}

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

```kotlin
// Code sample unavailable
```

{% endcode %}
{% endtab %}

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

```objc
// Code sample unavailable
```

{% endcode %}
{% endtab %}

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

```swift
// Code sample unavailable
```

{% endcode %}
{% endtab %}

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

```php
$wordOutputOptions = new WordOutputOptions();

// Optionally convert only the first page
$wordOutputOptions->SetPages(1, 1);

// Requires the Structured Output module
Convert::ToWord($filename, $output_filename, wordOutputOptions);
```

{% endcode %}
{% endtab %}

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

```python
wordOutputOptions = WordOutputOptions()

# Optionally convert only the first page
wordOutputOptions.SetPages(1, 1)

# Requires the Structured Output module
Convert.ToWord(filename, output_filename, wordOutputOptions)
```

{% endcode %}
{% endtab %}

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

```ruby
$wordOutputOptions = Convert::WordOutputOptions.new()

# Optionally convert only the first page
$wordOutputOptions.SetPages(1, 1);

# Requires the Structured Output module
Convert.toWord(filename, output_filename, $wordOutputOptions)
```

{% endcode %}
{% endtab %}

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

```vb
Dim wordOutputOptions As pdftron.PDF.Convert.WordOutputOptions = New pdftron.PDF.Convert.WordOutputOptions()

' Optionally convert only the first page
wordOutputOptions.SetPages(1, 1)

' Requires the Structured Output module
Convert.ToWord(filename, output_filename, wordOutputOptions)
```

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

To convert PDF Documents to Excel format.

{% hint style="warning" %}
**The Structured Output module is an optional add-on**

Only available on Desktop and Server (Windows, Linux, or Mac) You can find more details about how to install the Structured Output module [here ](https://docs.apryse.com/core/learn-more/modules.md#structured-output-module).
{% endhint %}

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

```csharp
Convert.ExcelOutputOptions excelOutputOptions = new Convert.ExcelOutputOptions();

// Optionally convert only the first page
excelOutputOptions.SetPages(1, 1);

// Requires the Structured Output module
Convert.ToExcel(filename, output_filename, excelOutputOptions);
```

{% endcode %}
{% endtab %}

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

```cpp
Convert::ExcelOutputOptions excelOutputOptions;

// Optionally convert only the first page
excelOutputOptions.SetPages(1, 1);

// Requires the Structured Output module
Convert::ToExcel(filename, output_filename, excelOutputOptions);
```

{% endcode %}
{% endtab %}

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

```go
excelOutputOptions := NewExcelOutputOptions()

// Optionally convert only the first page
excelOutputOptions.SetPages(1, 1)

// Requires the Structured Output module
ConvertToExcel(filename, output_filename, excelOutputOptions)
```

{% endcode %}
{% endtab %}

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

```java
Convert.ExcelOutputOptions excelOutputOptions = new Convert.ExcelOutputOptions();

// Optionally convert only the first page
excelOutputOptions.setPages(1, 1);

// Requires the Structured Output module
Convert.toExcel(filename, output_filename, excelOutputOptions);
```

{% endcode %}
{% endtab %}

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

```js
async function main() {
  const excelOutputOptions = new PDFNet.Convert.ExcelOutputOptions();

  // Optionally convert only the first page
  excelOutputOptions.setPages(1, 1);

  // Requires the Structured Output module
  await PDFNet.Convert.fileToExcel(filename, output_filename, excelOutputOptions);
}
PDFNet.runWithCleanup(main);
```

{% endcode %}
{% endtab %}

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

```kotlin
// Code sample unavailable
```

{% endcode %}
{% endtab %}

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

```objc
// Code sample unavailable
```

{% endcode %}
{% endtab %}

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

```swift
// Code sample unavailable
```

{% endcode %}
{% endtab %}

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

```php
$excelOutputOptions = new ExcelOutputOptions();

// Optionally convert only the first page
$excelOutputOptions->SetPages(1, 1);

// Requires the Structured Output module
Convert::ToExcel($filename, $output_filename, excelOutputOptions);
```

{% endcode %}
{% endtab %}

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

```python
excelOutputOptions = ExcelOutputOptions()

# Optionally convert only the first page
excelOutputOptions.SetPages(1, 1)

# Requires the Structured Output module
Convert.ToExcel(filename, output_filename, excelOutputOptions)
```

{% endcode %}
{% endtab %}

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

```ruby
$excelOutputOptions = Convert::ExcelOutputOptions.new()

# Optionally convert only the first page
$excelOutputOptions.SetPages(1, 1);

# Requires the Structured Output module
Convert.toExcel(filename, output_filename, $excelOutputOptions)
```

{% endcode %}
{% endtab %}

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

```vb
Dim excelOutputOptions As pdftron.PDF.Convert.ExcelOutputOptions = New pdftron.PDF.Convert.ExcelOutputOptions()

' Optionally convert only the first page
excelOutputOptions.SetPages(1, 1)

' Requires the Structured Output module
Convert.ToExcel(filename, output_filename, excelOutputOptions)
```

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

To convert PDF Documents to PowerPoint format.

{% hint style="warning" %}
**The Structured Output module is an optional add-on**

Only available on Desktop and Server (Windows, Linux, or Mac) You can find more details about how to install the Structured Output module [here ](https://docs.apryse.com/core/learn-more/modules.md#structured-output-module).
{% endhint %}

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

```csharp
Convert.PowerPointOutputOptions powerPointOutputOptions = new Convert.PowerPointOutputOptions();

// Optionally convert only the first page
powerPointOutputOptions.SetPages(1, 1);

// Requires the Structured Output module
Convert.ToPowerPoint(filename, output_filename, powerPointOutputOptions);
```

{% endcode %}
{% endtab %}

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

```cpp
Convert::PowerPointOutputOptions powerPointOutputOptions;

// Optionally convert only the first page
powerPointOutputOptions.SetPages(1, 1);

// Requires the Structured Output module
Convert::ToPowerPoint(filename, output_filename, powerPointOutputOptions);
```

{% endcode %}
{% endtab %}

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

```go
powerPointOutputOptions := NewPowerPointOutputOptions()

// Optionally convert only the first page
powerPointOutputOptions.SetPages(1, 1)

// Requires the Structured Output module
ConvertToPowerPoint(filename, output_filename, powerPointOutputOptions)
```

{% endcode %}
{% endtab %}

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

```java
Convert.PowerPointOutputOptions powerPointOutputOptions = new Convert.PowerPointOutputOptions();

// Optionally convert only the first page
powerPointOutputOptions.setPages(1, 1);

// Requires the Structured Output module
Convert.toPowerPoint(filename, output_filename, powerPointOutputOptions);
```

{% endcode %}
{% endtab %}

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

```js
async function main() {
  const powerPointOutputOptions = new PDFNet.Convert.PowerPointOutputOptions();

  // Optionally convert only the first page
  powerPointOutputOptions.setPages(1, 1);

  // Requires the Structured Output module
  await PDFNet.Convert.fileToPowerPoint(filename, output_filename, powerPointOutputOptions);
}
PDFNet.runWithCleanup(main);
```

{% endcode %}
{% endtab %}

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

```kotlin
// Code sample unavailable
```

{% endcode %}
{% endtab %}

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

```objc
// Code sample unavailable
```

{% endcode %}
{% endtab %}

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

```swift
// Code sample unavailable
```

{% endcode %}
{% endtab %}

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

```php
$powerPointOutputOptions = new PowerPointOutputOptions();

// Optionally convert only the first page
$powerPointOutputOptions->SetPages(1, 1);

// Requires the Structured Output module
Convert::ToPowerPoint($filename, $output_filename, powerPointOutputOptions);
```

{% endcode %}
{% endtab %}

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

```python
powerPointOutputOptions = PowerPointOutputOptions()

# Optionally convert only the first page
powerPointOutputOptions.SetPages(1, 1)

# Requires the Structured Output module
Convert.ToPowerPoint(filename, output_filename, powerPointOutputOptions)
```

{% endcode %}
{% endtab %}

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

```ruby
$powerPointOutputOptions = Convert::PowerPointOutputOptions.new()

# Optionally convert only the first page
$powerPointOutputOptions.SetPages(1, 1);

# Requires the Structured Output module
Convert.toPowerPoint(filename, output_filename, $powerPointOutputOptions)
```

{% endcode %}
{% endtab %}

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

```vb
Dim powerPointOutputOptions As pdftron.PDF.Convert.PowerPointOutputOptions = New pdftron.PDF.Convert.PowerPointOutputOptions()

' Optionally convert only the first page
powerPointOutputOptions.SetPages(1, 1)

' Requires the Structured Output module
Convert.ToPowerPoint(filename, output_filename, powerPointOutputOptions)
```

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

[Convert PDF to Office](https://docs.apryse.com/core/get-started/samples.md#pdf2officetest) Full sample code which shows how to convert generic PDF documents to Word, Excel, PowerPoint format


---

# 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/conversion/convert-pdf-to-word.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.
