No PDF file created on Windows 7 from custom application

 For several years we have successfully used PDFCreator on XP systems to print graphics and reports to a PDF file from an ultrasound diagnostic program.  This program produces reports for a variety of printers using common code with only scaling differences depending on the printer selected. 

 

By manipulating the AutosaveFilename key in the registry (HKCU\\Software\\PDFCreator\\Program) we are able to create a unique name for each report and have it saved in a predetermined folder.

 

When the application was migrated to Windows 7 it ran successfully in most aspects except that it no longer created any output file.  I have searched for any similar problems reported by other users and, while I’ve found a lot of people have had trouble getting PDFCreator to run on Win 7,  I haven’t come across anyone that seems to have our exact problem.

 

We have tried installing newer versions of PDFCreator and while these all print a test page properly and print out of other programs like Word, none of these versions work for our application where we define the registry configuration values “on the fly”…we fail to get any output file created…no errors or permissions complaints, just no file.

 

Here is the batch file we use to install PDFCreator:

 echo off

rem Install the printer software

PDFPrinter.exe /SILENT /NOICONS /SP /DIR="C:\\PDFPrinter" /REGFile="C:\\PDFPrinter\\PDFOptions.reg" /GROUP="UltraView"

rem Set the path for following modificatons

set path=C:\\PDFPrinter\\

rem Remove the scripts and com folder

rd %path%Scripts /S /Q

rd %path%COM /S /Q

 

 Here is the configuration values we set in the registry @ [HKEY_CURRENT_USER\\Software\\PDFCreator\\Program]:

"AutosaveDirectory"="C:\\\\EXAMINATIONS\\\\xxx_Subject_T"

"LastsaveDirectory"="C:\\\\Examinations\\\\"

"Language"="english"

"PrinterTemppath"="C:\\\\Program Files\\\\UltraView\\\\PDFPrinter\\\\Temp\\\\"

"AdditionalGhostscriptParameters"=""

"AdditionalGhostscriptSearchpath"=""

"AddWindowsFontpath"="1"

"AutosaveFilename"="xxx_Subject_Test (07-31-12 10.20)-1.pdf"

"AutosaveFormat"="0"

"AutosaveStartStandardProgram"="0"

"ClientComputerResolveIPAddress"="0"

"DisableEmail"="0"

"DontUseDocumentSettings"="0"

"FilenameSubstitutions"="Microsoft Word - |\\\\.doc|\\\\Microsoft Excel - |\\\\.xls|\\\\Microsoft PowerPoint - |\\\\.ppt|"

"FilenameSubstitutionsOnlyInTitle"="1"

"Logging"="0"

"LogLines"="100"

"NoConfirmMessageSwitchingDefaultprinter"="0"

"NoProcessingAtStartup"="0"

"NoPSCheck"="0"

"OptionsDesign"="0"

"OptionsEnabled"="1"

"OptionsVisible"="1"

"PrintAfterSaving"="0"

"PrintAfterSavingDuplex"="0"

"PrintAfterSavingNoCancel"="0"

"PrintAfterSavingPrinter"=""

"PrintAfterSavingQueryUser"="0"

"PrintAfterSavingTumble"="0"

"PrinterStop"="0"

"ProcessPriority"="1"

"ProgramFont"="MS Sans Serif"

"ProgramFontCharset"="0"

"ProgramFontSize"="8"

"RemoveAllKnownFileExtensions"="1"

"RemoveSpaces"="1"

"RunProgramAfterSaving"="0"

"RunProgramAfterSavingProgramname"=""

"RunProgramAfterSavingProgramParameters"="\\"\\""

"RunProgramAfterSavingWaitUntilReady"="1"

"RunProgramAfterSavingWindowstyle"="1"

"RunProgramBeforeSaving"="0"

"RunProgramBeforeSavingProgramname"=""

"RunProgramBeforeSavingProgramParameters"="\\"\\""

"RunProgramBeforeSavingWindowstyle"="1"

"SaveFilename"=""

"SendEmailAfterAutoSaving"="0"

"SendMailMethod"="0"

"ShowAnimation"="1"

"StartStandardProgram"="1"

"Toolbars"="1"

"UseAutosave"="1"

"UseAutosaveDirectory"="1"

"LastUpdateCheck"="20120730

 

I hope someone can suggest something we can try to fix this problem.

 Many Thanks

I am going to jump into this thread as I am having the exact same issues.  Let me know if you need more info.

ALLUSERSPROFILE=C:\ProgramData
APPDATA=C:\Users\Administrator\AppData\Roaming
asl.log=Destination=file
CommonProgramFiles=C:\Program Files\Common Files
COMPUTERNAME=RONJ-DESKTOP
ComSpec=C:\Windows\system32\cmd.exe
FP_NO_HOST_CHECK=NO
HOMEDRIVE=C:
HOMEPATH=\Users\Administrator
LOCALAPPDATA=C:\Users\Administrator\AppData\Local
LOGONSERVER=\\RONJ-DESKTOP
NUMBER_OF_PROCESSORS=8
OS=Windows_NT
Path=C:\Program Files\VIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Win
dows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;c:\Pro
gram Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL S
erver\100\DTS\Binn\;C:\Program Files\IDM Computer Solutions\UltraEdit\
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 6 Model 30 Stepping 5, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=1e05
ProgramData=C:\ProgramData
ProgramFiles=C:\Program Files
PROMPT=$P$G
PSModulePath=C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
PUBLIC=C:\Users\Public
SESSIONNAME=Console
SystemDrive=C:
SystemRoot=C:\Windows
TEMP=C:\Users\ADMINI~1\AppData\Local\Temp\1
TMP=C:\Users\ADMINI~1\AppData\Local\Temp\1
USERDOMAIN=RONJ-DESKTOP
USERNAME=Administrator
USERPROFILE=C:\Users\Administrator
windir=C:\Windows

Hi,
 

it would be very helpfull, if you enable logging by adding 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, please send it to us (support@pdfforge.org). It will help us to identify and solve the problem.

 

regards,

 

Robin

 I'm having exactly the same problem.

We've been using an 'automated' process for about 2 years now and suddenly no PDF files are being created.

We use Lotus Notes.

We select a number of dicuments at a view level and click a button to call PDFCreator to print the documents as PDF Files.

Here is my code that used to work  (This is LotusScript - similar to VB):

 

 

On Error 76 Goto ErrHndl_PathNotFound

sPDFPath$ = "c:\\PDF_" + Format$ (Now(), "hhmm") + "\\"

If Dir(sPDFPath$,16) = "" Then

Print sPDFPath$ & " does not exist"

Print "Creating " + sPDFPath$ + " now..."

End If

Set PDFCreator = CreateObject("PDFCreator.clsPDFCreator")

If Not PDFCreator.cStart("",True) Then

Print "Failed to start PDFCreator object"

Msgbox "Failed to start PDFCreator object", MB_ICONSTOP, "Error"

Goto SafeExit

End If 

Set doc = dc.GetFirstDocument

While Not doc Is Nothing

Set uiDoc = ws.EditDocument(False,Doc,True,"",True,True)

sPDFName$ = uidoc.WindowTitle & ".pdf"

FileName$ = sPDFPath$ & sPDFName$

If Not Dir(FileName$) = "" Then

Kill FileName$

End If

With PDFCreator

.cOption("UseAutosave") = 1

.cOption("UseAutosaveDirectory") = 1

.cOption("AutosaveDirectory") = sPDFPath$

.cOption("AutosaveFilename") = sPDFName$

.cOption("AutosaveFormat") = 0 

.cClearCache

End With

'Call notesUIDocument.Print( [ numCopies%, [, fromPage%, [, toPage%, [,draft, [, printerTitle]]]]] )

Call uiDoc.Print (1, 0, 0, False, "PDFCreator")

Call uiDoc.Close(True)

Set uiDoc = Nothing

 
The standard windows system advice box appears "Sending output to PDFCreator", but nothing gets created.
 
Help would be greatly appreaciated.
 
Ray Green.
 

 

 

We're having exactly the same problem.

We've been using PDFCreator with Win XP and Win 7 for a long time now - it's been working perfectly.

Now suddenly no PDF files are created.

We use Lotus Notes and create PDF files from a view using an action button to automatically generate PDF Files from selected documents.

Here is my code :(this is LotusScript - similar to VB)

 

On Error 76 Goto ErrHndl_PathNotFound

sPDFPath$ = "c:\\PDF_" + Format$ (Now(), "hhmm") + "\\"

If Dir(sPDFPath$,16) = "" Then

Print sPDFPath$ & " does not exist"

Print "Creating " + sPDFPath$ + " now..."

End If

Set PDFCreator = CreateObject("PDFCreator.clsPDFCreator")

If Not PDFCreator.cStart("",True) Then

Print "Failed to start PDFCreator object"

Msgbox "Failed to start PDFCreator object", MB_ICONSTOP, "Error"

Goto SafeExit

End If 

Set doc = dc.GetFirstDocument

While Not doc Is Nothing

Set uiDoc = ws.EditDocument(False,Doc,True,"",True,True)

sPDFName$ = uidoc.WindowTitle & ".pdf"

FileName$ = sPDFPath$ & sPDFName$

If Not Dir(FileName$) = "" Then

Kill FileName$

End If

With PDFCreator

.cOption("UseAutosave") = 1

.cOption("UseAutosaveDirectory") = 1

.cOption("AutosaveDirectory") = sPDFPath$

.cOption("AutosaveFilename") = sPDFName$

.cOption("AutosaveFormat") = 0 

.cClearCache

End With

'Call notesUIDocument.Print( [ numCopies%, [, fromPage%, [, toPage%, [,draft, [, printerTitle]]]]] )

Call uiDoc.Print (1, 0, 0, False, "PDFCreator")

Call uiDoc.Close(True)

Set uiDoc = Nothing

 

 

Your help would be greatly appreciated.

Ray Green

 

Does converting manually still work?

 Yes - the dialog for where to save the file opens and I can select the path and change the default file name (if I want to).

Hi,

 

please try with version 1.5.0 which was released today, ther was an issue with SessionIDs which is fixed now, it could effect your problem aswell.

 

regards,

 

Robin

Hi,

 

please enable logging like mentioned above,

@broy : The "PrinterTemppath" setting is not in use anymore, your user TMP path will be used,  make sure you have sufficient rights for it.

 

regards,

 

Robin

 Here is the log file :

 

[29.07.2012 09:26:47]-------------------- = --------------------

[29.07.2012 09:26:47]Modul-PdfStartDocPort=Start

[29.07.2012 09:26:47]PrinterName=PDFCreator

[29.07.2012 09:26:47]JobId=19

[29.07.2012 09:26:47]ComputerName=\\\\TXPC021

[29.07.2012 09:26:47]UserName=Tasker

[29.07.2012 09:26:47]SessionId=1

[29.07.2012 09:26:47]WinStation=RDP-Tcp#0

[29.07.2012 09:26:47]PDFServer=FALSE

[29.07.2012 09:26:47]Modul-GetUserTmp=Start

[29.07.2012 09:26:47]RevertToSelf=successful

[29.07.2012 09:26:47]WTSQueryUserToken=successful

[29.07.2012 09:26:47]GetEnvironemtVariableForUser-Variable=%TMP%

[29.07.2012 09:26:47]GetEnvironemtVariableForUser-Result=C:\\Users\\Tasker\\AppData\\Local\\Temp

[29.07.2012 09:26:47]User-Temp=C:\\Users\\Tasker\\AppData\\Local\\Temp

[29.07.2012 09:26:47]Modul-GetUserTmp=End

[29.07.2012 09:26:47]TmpPath=C:\\Users\\Tasker\\AppData\\Local\\Temp\\1\\PdfCreator\\Spool

[29.07.2012 09:26:47]PostscriptFile=C:\\Users\\Tasker\\AppData\\Local\\Temp\\1\\PdfCreator\\Spool\\A0327020A0014AFAB8D5A9D1D2BB2241.ps

[29.07.2012 09:26:47]DocName=MPC-C383-Activity Report

[29.07.2012 09:26:47]OpenPrinter=True

[29.07.2012 09:26:47]Modul-PdfStartDocPort=End

[29.07.2012 09:26:47]CreateFile: CloseHandle(hFile)=successful

[29.07.2012 09:26:47]Modul-StartPdfCreator=Start

[29.07.2012 09:26:47]RevertToSelf=successful

[29.07.2012 09:26:47]WTSQueryUserToken=successful

[29.07.2012 09:26:47]DuplicateTokenEx=successful

[29.07.2012 09:26:47]CreateEnvironmentBlock=successful

[29.07.2012 09:26:47]EnvironmentSize=1310

[29.07.2012 09:26:47]CommandLine= /PPDFCREATORPRINTER /PIFC:\\Users\\Tasker\\AppData\\Local\\Temp\\1\\PdfCreator\\Spool\\A0327020A0014AFAB8D5A9D1D2BB2241.inf

[29.07.2012 09:26:47]Command=C:\\Program Files\\PDFCreator\\PDFCreator.exe

[29.07.2012 09:26:47]CloseHandle(hTokenDup)=successful

[29.07.2012 09:26:47]CloseHandle(hTokenNew)=successful

[29.07.2012 09:26:47]CloseHandle(pi.hThread)=successful

[29.07.2012 09:26:47]CloseHandle(pi.hProcess)=successful

[29.07.2012 09:26:47]DestroyEnvironmentBlock=successful

[29.07.2012 09:26:47]Modul-StartPdfCreator=End

 

 

 

 Hi guys,

I don't know if this makes a difference but I tried the same application on a different PC and it works.

The PC it doesn't work on is running Windows 7 Professional.

The PC is works on is running Windows 7 Home Premium.

It looks like an update made recently to the Win 7 Pro system has broken the way PDFCreator works.

I know I've not changed any Access Rights on the Win 7 Pro system.

Ray Green.

 

 I've downloaded and tried the latest verision 1.50 and the same problem exists on the Windows 7 Professional.

Hi guys,

Any update on this problem?

I still can’t print using a Win 7 Pro system.

What did you see from the log file I sent?

Ray.

Hi,

it is most likely a problem where PDFCreator looks for the .ps file in the wrong path, please also post the “normal” PDFCreator log (can be enabled by menu or pressing F3 in the PDFCreator print monitor), since the pdfcmon log only shows where the files are written. Thank you for your help and patience.

regards,

Robin

Hi Robin


Here’s the Log file :

13/09/2012 11:37:03: PDFCreator Program End
13/09/2012 11:37:32: PDFCreator Program Start
13/09/2012 11:37:32: Windowsversion: Windows 7 6.1 Build 7601 (Service Pack 1) [TerminalServer IsWinXPPlus IsWinVistaPlus IsWinVistaSP1 IsWindows7]
13/09/2012 11:37:32: InstalledAsServer: False
13/09/2012 11:37:32: MyAppData: C:\Users\Tasker\AppData\Roaming
13/09/2012 11:37:32: PDFCreator spool directory (Write access: true): C:\Users\Tasker\AppData\Local\Temp\PDFCreator\Spool\
13/09/2012 11:40:11: PDFCreator Program Start
13/09/2012 11:40:11: Windowsversion: Windows 7 6.1 Build 7601 (Service Pack 1) [TerminalServer IsWinXPPlus IsWinVistaPlus IsWinVistaSP1 IsWindows7]
13/09/2012 11:40:11: InstalledAsServer: False
13/09/2012 11:40:11: MyAppData: C:\Users\Tasker\AppData\Roaming
13/09/2012 11:40:11: PDFCreator spool directory (Write access: true): C:\Users\Tasker\AppData\Local\Temp\PDFCreator\Spool\

Hi,
now at least it is clear what is going wrong:
PDFCreator is spooling to:

C:\Users\Tasker\AppData\Local\Temp\1\PdfCreator\Spool\

but looking for the file in

C:\Users\Tasker\AppData\Local\Temp\PDFCreator\Spool\

More info on this as soon as we know more about why this is happening.

regards,

Robin


Update: In some cases the pdfcmon.dll incorrectly assumes that the user is connected remotely and not locally, could you please check your sessionname by typing “set” into the commandprompt and looking up SESSIONNAME=  ?
Also it would be great if you could “print” (using pdfcreator on a machine where pdf creation doesn´t work) some text from notepad and send us the.inf file.
I know it´s asking a lot, but at the moment we are depending on friendly users to help us, since we cannot reproduce this problem on our testmachines.


regards,

Robin

Here is the .inf for a .txt file that generates the .ps but doesn’t generate the pdf.  Let me know if you need more info.

[1]
SessionId=1
WinStation=RDP-Tcp#0
UserName=Admin
ClientComputer=\\4DPREPROCESSOR
SpoolFileName=C:\Users\Admin\AppData\Local\Temp\1\PdfCreator\Spool\F8BC16161BA14F49BE403006C1677CC1.ps
PrinterName=PDFCreator
JobId=2
DocumentTitle=D:\PDF_creator_1.5.0\this_is_a_test.txt

I am also having the same problem with 1.5.0: I’m trying to migrate a system that uses the COM interface from Windows Server 2003 to Windows Server 2008 R2 (Virtual Machine).  Initially I installled PDFCreator 1.4.3 and just today upgraded that to 1.5.0.


In 1.5.0 I’m getting the same issue:  the .inf/.ps files are being stored in C:\Users\dcaton\AppData\Local\Temp\2\PdfCreator\Spool, but PdfCreator will only pick them up if i manually move them to C:\Users\dcaton\AppData\Local\Temp\PDFCreator\Spool folder.  

I am also using the COM interface from VBscript and getting err #=-2147024156-Could not create object named “PDFCreator.clsPDFCreator” on the line “Set PDFCreator = Wscript.createobject(“PDFCreator.clsPDFCreator”, “PDFCreator_”)”.

Hi Robin,


I did what you requested : the result of Set SessionName is : RDP-TCP#0

Yes, I do connect remotely using RDP and have been doing so for a long time now.
It’s not been a problem with earlier versions of PDFCreator.

Regards,
Ray.