> 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/windows-service.md).

# Convert to PDF inside Windows service on Server/Desktop

Learn how Windows Service applications function and the necessary permissions for successful PDF conversion. Ensure access to system folders for seamless operation. The Apryse Server SDK streamlines s

Windows Service applications run unattended without any form of user interaction. By default, Windows Service applications use the “LOCAL SYSTEM” or “LOCAL SERVICE” account. These accounts have:

* Very limited amount permissions for tasks needing registry access
* Access to some system folders.

Due to their nature of being unattended, it is understandable that these applications have limited permissions to mitigate security risks. To be able to successfully convert to PDF, from a Windows service, it is necessary to ensure that the service has the necessary permissions and access to perform the conversion.

## Ensuring filesystem access

When using Microsoft Office Excel, before the application actually opens, the desktop folder of the user must be present. For example, when user “Bob” opens Microsoft Office Excel, Excel requires the folder “C:\Users\Bob\Desktop” to be both present and accessible before the actual Excel windows will show in Bob’s screen. Similarly, for Windows Service, Excel expects “LOCAL SYSTEM’s” or “LOCAL SERVICE’s” desktop folder to be present and accessible before the process will continue.

Local System or Local Service’s desktop folders can be found in the following locations:

* C:\Windows\System32\config\systemprofile\Desktop
* C:\Windows\SysWOW64\config\systemprofile\Desktop (only on 64-bit Windows)

In order for `ToPdf` to function with “LOCAL SYSTEM” or “LOCAL SERVICE”, the desktop folders above must first be created. It is also important to make sure that these system accounts have access to the desktop folders. It is normally not necessary to set the permissions explicitly because the Desktop will inherit them from the systemprofile folder.

Another thing to keep in mind when using 64-bit Windows: 32-bit applications use the "C:\Windows\SysWOW64" folders, while 64-bit applications use "C:\Windows\System32".

* If a 64-bit Microsoft Office version is installed on a 64-bit Windows, the required desktop folder will be:

C:\Windows\System32\config\systemprofile\Desktop - If a 32-bit Microsoft Office version is installed on a 64-bit Windows, the required folder will be: C:\Windows\SysWOW64\config\systemprofile\Desktop

If using system accounts does not work with `ToPdf` even after the above desktop folders are created, an alternative would be to use a user account for the Windows Service instead. There may be some cases where the Apryse PDFNet printer will not work with system accounts because the printer requires access to the registry. In such cases, user accounts normally work better.


---

# 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/windows-service.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.
