Invalid pointer error when converting Word to PDF unattended
Moderators: Daniel - PDF-XChange, PDF-XChange Support, Vasyl - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Stefan - PDF-XChange
Invalid pointer error when converting Word to PDF unattended
Hi,
Using PDF tools v. 10.3.1 on a Windows2016 server machine on which I'm an admin.
I've scripted batch conversion of hundreds of Word files to PDF via the Convert files to PDF tools.
The source files are located in a folder that does not require admin permission for access, on a secondary partition.
When running the script interactively while logged on the machine, all files are converted succesfully.
I've tried scheduling the script via a Task scheduler task, which I want to run unattended ie even when I'm not logged on. I've configured the task this way, configured it with highest privileges, and stored my password in the task for access to non-local ressources (even though all files are on the machine).
However, when the task runs, conversion fails for all files with the same message: "Invalid pointer fo file <file path and name>".
Is that a known limitation?
Thank you.
Using PDF tools v. 10.3.1 on a Windows2016 server machine on which I'm an admin.
I've scripted batch conversion of hundreds of Word files to PDF via the Convert files to PDF tools.
The source files are located in a folder that does not require admin permission for access, on a secondary partition.
When running the script interactively while logged on the machine, all files are converted succesfully.
I've tried scheduling the script via a Task scheduler task, which I want to run unattended ie even when I'm not logged on. I've configured the task this way, configured it with highest privileges, and stored my password in the task for access to non-local ressources (even though all files are on the machine).
However, when the task runs, conversion fails for all files with the same message: "Invalid pointer fo file <file path and name>".
Is that a known limitation?
Thank you.
- Paul - PDF-XChange
- Site Admin
- Posts: 7358
- Joined: Wed Mar 25, 2009 10:37 pm
- Contact:
Re: Invalid pointer error when converting Word to PDF unattended
Hi, SnowOn
I can't think off the top of my head what might cause this. Can I ask you to update to current (10.4.4.392) and confirm if the behaviour persists?
If it does may I see the script? I will try it here.
I can't think off the top of my head what might cause this. Can I ask you to update to current (10.4.4.392) and confirm if the behaviour persists?
If it does may I see the script? I will try it here.
Best regards
Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com
Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com
Re: Invalid pointer error when converting Word to PDF unattended
Thank you Paul,
I'll see whether I can update - the machine in question is a corporate computer, so I won't be able to submit the script in question either.
I'll come back to you if/when I can update and retry.
Thanks again!
I'll see whether I can update - the machine in question is a corporate computer, so I won't be able to submit the script in question either.
I'll come back to you if/when I can update and retry.
Thanks again!
- Dimitar - PDF-XChange
- Site Admin
- Posts: 2199
- Joined: Mon Jan 15, 2018 9:01 am
Re: Invalid pointer error when converting Word to PDF unattended
We will await your feedback on the matter.
Re: Invalid pointer error when converting Word to PDF unattended
Hi Paul, Dimitar,
I could update to the latest version as you advised.
This time I don't get any "invalid pointer" messages when running unattended.
No file, however, is converted; the tool runs is around 30 seconds (a normal run is around 30 minutes as over 200 files must be converted), and the log file is just full of lines like these:
< Convert Files to PDF
[12/19/2024, 12:43:36 PM] > Convert Files to PDF
[12/19/2024, 12:43:36 PM] < Convert Files to PDF
[12/19/2024, 12:43:36 PM] > Convert Files to PDF
I'll retry with a full log as this doesn't provide any useful information.
Meanwhile, I confirm that running the script interactively works: the files are processed and converted.
I'm afraid that I cannot share my script due to strict company policies, which I know doesn't help. It's a basic VBS script that contains a few lines like that:
cmd = """C:\Program Files\Tracker Software\PDF Tools\PDFXTools.exe"" /RunTool:showui=no;showprog=no;showrep=no "& ToolID & " /Log:full=no ""C:\Users\MyObfuscatedUserName\LogFile_""" & date & ".log"
Set oExec = WshShell.Exec(cmd)
The tool referenced by ToolID is a customised (for input and output paths) Word to PDF converter. The script itself runs well unattended: everything is executed, but the conversion task itself fails without any obvious reason.
Thanks again!!
I could update to the latest version as you advised.
This time I don't get any "invalid pointer" messages when running unattended.
No file, however, is converted; the tool runs is around 30 seconds (a normal run is around 30 minutes as over 200 files must be converted), and the log file is just full of lines like these:
< Convert Files to PDF
[12/19/2024, 12:43:36 PM] > Convert Files to PDF
[12/19/2024, 12:43:36 PM] < Convert Files to PDF
[12/19/2024, 12:43:36 PM] > Convert Files to PDF
I'll retry with a full log as this doesn't provide any useful information.
Meanwhile, I confirm that running the script interactively works: the files are processed and converted.
I'm afraid that I cannot share my script due to strict company policies, which I know doesn't help. It's a basic VBS script that contains a few lines like that:
cmd = """C:\Program Files\Tracker Software\PDF Tools\PDFXTools.exe"" /RunTool:showui=no;showprog=no;showrep=no "& ToolID & " /Log:full=no ""C:\Users\MyObfuscatedUserName\LogFile_""" & date & ".log"
Set oExec = WshShell.Exec(cmd)
The tool referenced by ToolID is a customised (for input and output paths) Word to PDF converter. The script itself runs well unattended: everything is executed, but the conversion task itself fails without any obvious reason.
Thanks again!!
- Stefan - PDF-XChange
- Site Admin
- Posts: 19826
- Joined: Mon Jan 12, 2009 8:07 am
- Contact:
Re: Invalid pointer error when converting Word to PDF unattended
Hello SnowOn,
Is the script being run through the same account you tested with when logged in?
My suspicion is that the MS Office might not be accessible for the account the script is being run through and that's why the conversions do not happen. Can you check and see if that is the case, as we do need to read some MS Office APIs for the conversion process.
Kind regards,
Stefan
Is the script being run through the same account you tested with when logged in?
My suspicion is that the MS Office might not be accessible for the account the script is being run through and that's why the conversions do not happen. Can you check and see if that is the case, as we do need to read some MS Office APIs for the conversion process.
Kind regards,
Stefan
Re: Invalid pointer error when converting Word to PDF unattended
Hi Stefan,
Thanks for you reply.
Yes it's run with the same account (mine) regardless of whether run interactively or unattended.
I have admin privileges on the machine and ticked "Run with elevated privileges" in task scheduler.
You're very likely right though - I'll cross-check that with our IT services, meanwhile is there a way that PDF-tools can report any error message from Office, if any? The full log just reports that files are processed, but does not state whether processing was successful or not.
Thanks again for your help that I sincerely appreciate!
Thanks for you reply.
Yes it's run with the same account (mine) regardless of whether run interactively or unattended.
I have admin privileges on the machine and ticked "Run with elevated privileges" in task scheduler.
You're very likely right though - I'll cross-check that with our IT services, meanwhile is there a way that PDF-tools can report any error message from Office, if any? The full log just reports that files are processed, but does not state whether processing was successful or not.
Thanks again for your help that I sincerely appreciate!
- Stefan - PDF-XChange
- Site Admin
- Posts: 19826
- Joined: Mon Jan 12, 2009 8:07 am
- Contact:
Re: Invalid pointer error when converting Word to PDF unattended
Hello SnowOn,
I do not believe Tools can log any messages from Office, but I will check with my colleagues and see if e.g. Paul or Dimitar have any more info than myself. We will try to post an update here as soon as possible!
Kind regards,
Stefan
I do not believe Tools can log any messages from Office, but I will check with my colleagues and see if e.g. Paul or Dimitar have any more info than myself. We will try to post an update here as soon as possible!
Kind regards,
Stefan
Re: Invalid pointer error when converting Word to PDF unattended
Hello,
Coming back to you after a thorough investigation by out IT service - you were right, it all boils down to Office licence not being properly assigned for unattended jobs.
First I'd like to thank you for your help and insights, especially that you helped me debug an issue that wasn't yours
If at all possible, it would be helpful if PDF Tools could log error messages from Office, to help diagnose these corner cases (whihc become less and less corner with the advent of cloud licencing).
Thanks again for your help!
Coming back to you after a thorough investigation by out IT service - you were right, it all boils down to Office licence not being properly assigned for unattended jobs.
First I'd like to thank you for your help and insights, especially that you helped me debug an issue that wasn't yours

If at all possible, it would be helpful if PDF Tools could log error messages from Office, to help diagnose these corner cases (whihc become less and less corner with the advent of cloud licencing).
Thanks again for your help!
- Stefan - PDF-XChange
- Site Admin
- Posts: 19826
- Joined: Mon Jan 12, 2009 8:07 am
- Contact:
Re: Invalid pointer error when converting Word to PDF unattended
Hello SnowOn,
Glad to hear you figured it out, and I am afraid that Tools might not be able to capture such error messaged generated by Office itself, sorry!
Kind regards,
Stefan
Glad to hear you figured it out, and I am afraid that Tools might not be able to capture such error messaged generated by Office itself, sorry!
Kind regards,
Stefan