All Collections
Using PDF2XL
Command Line
Calling PDF2XL Enterprise (command line) in a Service
Calling PDF2XL Enterprise (command line) in a Service
PDF2XL Support avatar
Written by PDF2XL Support
Updated over a week ago

You may find that you need to call PDF2XL Enterprise without user intervention, either during a specific time of day (using Task Scheduler) or based on another event (using Windows Services)

These options usually run using a System account, not a user account. Since Office is a user application, it doesn't know how to start as System

Office applications are designed to work only with interactive user accounts, ie, accounts that have a desktop and can show a window. Usual service accounts are not interactive.
Here are some Microsoft references about the issue: https://support.microsoft.com/en-us/help/257757/considerations-for-server-side-automation-of-office (the page mentions "server side" issues but the same information applies to applications run as services, or launched by the Task Scheduler).
There are a few tweaks that *may* solve the issue, such as the ones found here https://superuser.com/questions/579900/why-cant-excel-open-a-file-when-run-from-task-scheduler and here http://stackoverflow.com/questions/4234615/excel-com-automation-stops-working-when-user-logs-off, but the simplest option would be to set an actual user as the service account.
โ€‹
To verify that this is actually the issue you are facing, you can create a simple script in VB using Excel automation (Excel.Application class) and test it in your service. The call should fail silently, as it is happening when calling PDF2XL. Another option would be to use another output format, such as CSV.

Did this answer your question?