Automation with MS Office and OpenOffice Failing

Im trying to build a background service to use PDFCreator 1.5.1 on windows server 2008rc2 to convert RTFs to PDFs. The service works fine using WordPad, however as soon as I install MS Office (needed for images and nested tables) the whole thing hangs. 


The service is running, pdfCreator.exe is running and winword.exe executes but the PDF never appears in the autosave directory. I installed Open Office to see if it was a problem with MS, but OO hangs at the same point. I can print the files manually

The service is listening for events from PDFCreator any errors should be added to the event log, but the log doesn’t show any issue. PDFCreators log shows the following

"15/11/2012 16:14:20: Windowsversion: Windows 2008 R2 Server 6.1 Build 7600 () [TerminalServer IsWinXPPlus IsWinVistaPlus IsWin2008R2Server]
15/11/2012 16:14:20: PDFCreator spool directory (Write access: true): C:\Windows\TEMP\PDFCreator\Spool"

Any help would be greatly appreciated 

Hi,

please enable additional logging for troobleshooting.

To enable logging for the pdfcmon.dll add the following DWORD (32 bit) value to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Monitors\pdfcmon in your registry: name : Logging, value :1. This will cause PDFCreator to create an advanced logfile at %Windir%\Temp\_pdfcmonLog.txt

regards,

Robin

Added reg as instructed, however no file is generated while running as a service (Logged in as Adminstrator), which is when the problem occurs. However, if it helps, heres the result running as a normal application. Also below is a second log from when the service is running but WordPad is default app instead of word

"[20.10.2012 17:09:46]-------------------- = --------------------

[20.10.2012 17:09:46]DLL-FileVersion=0.2.1.0
[20.10.2012 17:09:46]Modul-GetOsInfo=Start
[20.10.2012 17:09:46]GetVersionEx=True
[20.10.2012 17:09:46]BuildNumber=7600
[20.10.2012 17:09:46]MajorVersion=6
[20.10.2012 17:09:46]MinorVersion=1
[20.10.2012 17:09:46]PlatformId=2
[20.10.2012 17:09:46]CSDVersion=
[20.10.2012 17:09:46]ProductType=3
[20.10.2012 17:09:46]ServicePackMajor=0
[20.10.2012 17:09:46]ServicePackMinor=0
[20.10.2012 17:09:46]SuiteMask=272
[20.10.2012 17:09:46]Modul-GetOsInfo=End (Void)
[20.10.2012 17:09:46]Modul-PdfStartDocPort=Start
[20.10.2012 17:09:46]Modul-GetJobInfo=Start
[20.10.2012 17:09:46]OpenPrinter=True
[20.10.2012 17:09:46]pjob->pMachineName=\\WIN-4EDP8LB6B78
[20.10.2012 17:09:46]pjob->pUserName=Administrator
[20.10.2012 17:09:46]Modul-GetJobInfo=End (True)
[20.10.2012 17:09:46]PrinterName=PDFCreator
[20.10.2012 17:09:46]JobId=3
[20.10.2012 17:09:46]ComputerName=\\WIN-4EDP8LB6B78
[20.10.2012 17:09:46]UserName=Administrator
[20.10.2012 17:09:46]Modul-GetSessionData=Start
[20.10.2012 17:09:46]OpenThreadToken=successful
[20.10.2012 17:09:46]DuplicateTokenEx=successful
[20.10.2012 17:09:46]SessionId=1
[20.10.2012 17:09:46]WTSEnumerateSessions=successful
[20.10.2012 17:09:46]Session found=true
[20.10.2012 17:09:46]WinStation=Console
[20.10.2012 17:09:46]Modul-GetSessionData=End (True)
[20.10.2012 17:09:46]SessionId=1
[20.10.2012 17:09:46]WinStation=Console
[20.10.2012 17:09:46]PDFServer=TRUE
[20.10.2012 17:09:46]TmpPath=C:\Windows\TEMP\PdfCreator\Spool
[20.10.2012 17:09:46]Modul-GetDatFileName=Start
[20.10.2012 17:09:46]pDatFile=E15241D5425846B785FEC95064C8E181.inf
[20.10.2012 17:09:46]Modul-GetDatFileName=End (True)
[20.10.2012 17:09:46]PostscriptFile=C:\Windows\TEMP\PdfCreator\Spool\E15241D5425846B785FEC95064C8E181.ps
[20.10.2012 17:09:46]DocName=Microsoft Word - temp_documents_143745_20121025163203.rtf
[20.10.2012 17:09:46]OpenPrinter=True
[20.10.2012 17:09:46]Modul-PdfStartDocPort=End (True)
[20.10.2012 17:09:46]Modul-CreateDatFile=Start
[20.10.2012 17:09:46]CreateFile: CloseHandle(hFile)=successful
[20.10.2012 17:09:46]Modul-CreateDatFile=End (True)

WordPad instead of Word
[20.10.2012 17:20:09]-------------------- = --------------------
[20.10.2012 17:20:09]DLL-FileVersion=0.2.1.0
[20.10.2012 17:20:09]Modul-GetOsInfo=Start
[20.10.2012 17:20:09]GetVersionEx=True
[20.10.2012 17:20:09]BuildNumber=7600
[20.10.2012 17:20:09]MajorVersion=6
[20.10.2012 17:20:09]MinorVersion=1
[20.10.2012 17:20:09]PlatformId=2
[20.10.2012 17:20:09]CSDVersion=
[20.10.2012 17:20:09]ProductType=3
[20.10.2012 17:20:09]ServicePackMajor=0
[20.10.2012 17:20:09]ServicePackMinor=0
[20.10.2012 17:20:09]SuiteMask=272
[20.10.2012 17:20:09]Modul-GetOsInfo=End (Void)
[20.10.2012 17:20:09]Modul-PdfStartDocPort=Start
[20.10.2012 17:20:09]Modul-GetJobInfo=Start
[20.10.2012 17:20:09]OpenPrinter=True
[20.10.2012 17:20:09]pjob->pMachineName=\\WIN-4EDP8LB6B78
[20.10.2012 17:20:09]pjob->pUserName=Administrator
[20.10.2012 17:20:09]Modul-GetJobInfo=End (True)
[20.10.2012 17:20:09]PrinterName=PDFCreator
[20.10.2012 17:20:09]JobId=2
[20.10.2012 17:20:09]ComputerName=\\WIN-4EDP8LB6B78
[20.10.2012 17:20:09]UserName=Administrator
[20.10.2012 17:20:09]Modul-GetSessionData=Start
[20.10.2012 17:20:09]OpenThreadToken=successful
[20.10.2012 17:20:09]DuplicateTokenEx=successful
[20.10.2012 17:20:09]SessionId=0
[20.10.2012 17:20:09]WTSEnumerateSessions=successful
[20.10.2012 17:20:09]Modul-GetSessionData=End (True)
[20.10.2012 17:20:09]SessionId=0
[20.10.2012 17:20:09]WinStation=
[20.10.2012 17:20:09]PDFServer=TRUE
[20.10.2012 17:20:09]TmpPath=C:\Windows\TEMP\PdfCreator\Spool
[20.10.2012 17:20:09]Modul-GetDatFileName=Start
[20.10.2012 17:20:09]pDatFile=E7AC037824F24775A0C96F8D6A2AF02D.inf
[20.10.2012 17:20:09]Modul-GetDatFileName=End (True)
[20.10.2012 17:20:09]PostscriptFile=C:\Windows\TEMP\PdfCreator\Spool\E7AC037824F24775A0C96F8D6A2AF02D.ps
[20.10.2012 17:20:09]DocName=temp_documents_143745_201210251
[20.10.2012 17:20:09]OpenPrinter=True
[20.10.2012 17:20:09]Modul-PdfStartDocPort=End (True)
[20.10.2012 17:20:10]Modul-CreateDatFile=Start
[20.10.2012 17:20:10]CreateFile: CloseHandle(hFile)=successful
[20.10.2012 17:20:10]Modul-CreateDatFile=End (True)”

Hi,

please try if this problem is fixed with version 1.6.2

regards,

Robin

Hi Robin,


Thanks for coming back to me, unfortunately after applying the update, the problem persists

Hi,

could you kindly also post a log of the same thing, but using version 1.6.2?
(mainly to ensure the update replaced the pdfcmon.dll)
Does it only happen with RTFs? Or does automated printing from Word not work at all?

I followed the instructions previously posted for enabling advanced logging, however once again nothing is generated. Tested with both RTF and DOCX file formats. Winword.exe just runs gradually claiming more system memory but never produces anything (left to process for 5 minutes), Wordpad continues to work fine. If it’s helpful please find below, the logs generated under WordPad conditions.


[05.01.2013 17:04:57]-------------------- = --------------------
[05.01.2013 17:04:57]Modul-PdfStartDocPort=Start
[05.01.2013 17:04:57]DLL-FileVersion=0.2.3.0
[05.01.2013 17:04:57]Modul-GetOsInfo=Start
[05.01.2013 17:04:57]GetVersionEx=True
[05.01.2013 17:04:57]BuildNumber=7600
[05.01.2013 17:04:57]MajorVersion=6
[05.01.2013 17:04:57]MinorVersion=1
[05.01.2013 17:04:57]PlatformId=2
[05.01.2013 17:04:57]CSDVersion=
[05.01.2013 17:04:57]ProductType=3
[05.01.2013 17:04:57]ServicePackMajor=0
[05.01.2013 17:04:57]ServicePackMinor=0
[05.01.2013 17:04:57]SuiteMask=272
[05.01.2013 17:04:57]Modul-GetOsInfo=End (Void)
[05.01.2013 17:04:57]Modul-GetJobInfo=Start
[05.01.2013 17:04:57]OpenPrinter=True
[05.01.2013 17:04:57]pjob->pMachineName=\\WIN-4EDP8LB6B78
[05.01.2013 17:04:57]pjob->pUserName=Administrator
[05.01.2013 17:04:57]Modul-GetJobInfo=End (True)
[05.01.2013 17:04:57]PrinterName=PDFCreator
[05.01.2013 17:04:57]JobId=2
[05.01.2013 17:04:57]ComputerName=\\WIN-4EDP8LB6B78
[05.01.2013 17:04:57]UserName=Administrator
[05.01.2013 17:04:57]Modul-GetSessionData=Start
[05.01.2013 17:04:57]OpenThreadToken=successful
[05.01.2013 17:04:57]DuplicateTokenEx=successful
[05.01.2013 17:04:57]SessionId=0
[05.01.2013 17:04:57]WTSEnumerateSessions=successful
[05.01.2013 17:04:57]Modul-GetSessionData=End (True)
[05.01.2013 17:04:57]Modul-IsConsoleSession=Start
[05.01.2013 17:04:57]sessionID=0
[05.01.2013 17:04:57]WTSGetActiveConsoleSessionId=1
[05.01.2013 17:04:57]Modul-IsConsoleSession=End (False)
[05.01.2013 17:04:57]SessionId=0
[05.01.2013 17:04:57]WinStation=
[05.01.2013 17:04:57]PDFServer=TRUE
[05.01.2013 17:04:57]TmpPath=C:\Windows\TEMP\PdfCreator\Spool
[05.01.2013 17:04:57]Modul-GetDatFileName=Start
[05.01.2013 17:04:57]pDatFile=11CBE1911F1C4A95B71186B90095A51E.inf
[05.01.2013 17:04:57]Modul-GetDatFileName=End (True)
[05.01.2013 17:04:57]PostscriptFile=C:\Windows\TEMP\PdfCreator\Spool\11CBE1911F1C4A95B71186B90095A51E.ps
[05.01.2013 17:04:57]DocName=temp_documents_143745_201210251
[05.01.2013 17:04:57]OpenPrinter=True
[05.01.2013 17:04:57]Modul-PdfStartDocPort=End (True)
[05.01.2013 17:04:57]Modul-CreateDatFile=Start
[05.01.2013 17:04:57]CreateFile: CloseHandle(hFile)=successful
[05.01.2013 17:04:57]Modul-CreateDatFile=End (True)