Initialyze PDFCreator with VBScript on automation system

Hi !


We decide to implement the new automation interface of the PDFCreator V2. We had already implemented the formal version in our system.

I use the small script that you can find here under to understand and test your new interface. I tested this script within Excel, with cscript.exe in an .vbs file and in our application. This script work fine with Excel and cscript.exe but not in our application. 

I understand that there is an uncompatibility between our 2 systems but I have no problem to start any other application with ActiveX interface with our system.

The script start wel and stop on the line “oPDFjq.Initialize” and just hang. If I try “oPDFjq.Count” before the “initialize” then i receive a logical error (“object reference not set to an instance of an object”) telling me that I’m well connected to the interface.

I test the trace tool on your application but it stays empty during automation use.

Do not hesitate to ask questions if needed. Thanks for your help.

Axl


Dim oPDFc, oPDFjq
Dim iJobCount

Set oPDFjq = CreateObject(“PDFCreatorBeta.JobQueue”)
Msgbox “Objet <” & TypeName(oPDFjq) & “> Created”, vbInformation

Set oPDFc = CreateObject(“PDFCreatorBeta.PDFCreator”)
Msgbox “Objet <” & TypeName(oPDFc) & “> Created”, vbInformation

If Not oPDFc.IsInstanceRunning() Then
oPDFjq.Initialize 
Msgbox “PDFCreator started.”, vbInformation
iJobCount = oPDFjq.Count
If iJobCount > 0 Then
Msgbox “There is " & cstr(iJobCount) & " jobs in the PDF Queue !”, vbInformation
Else
Msgbox “There is no job in the PDF Queue !”, vbInformation
End If
oPDFjq.ReleaseCom
Msgbox “PDFCreator ended.”, vbInformation
Else
Msgbox “Instance not running !”, vbexclamation
End If

Hi,


please enable additional logging for the pdfcmon.dll (print monitor) by adding a new DWORD with the name logging and the value 1 to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Monitors\pdfcmon . This will create a log in %Windir%\Temp\_pdfcmonLog.txt . Please print any document (except the PDFCreator testpage) to the PDFCreator printer and send us the pdfcmonLog.txt or paste it here (use the "paste as text button if you get a message too long error).

best regards,




Hi Robin !


I made the test twice through our application on 2 separate server and build of PDFCreator v2. All versions have the problem.

This test is made on Windows server 2003 R2 SP2 (32bits)
[09.03.2015 15:22:56.587]-------------------- = --------------------
[09.03.2015 15:22:56.587]Modul-PdfStartDocPort=Start
[09.03.2015 15:22:56.587]DLL-FileVersion=0.5.1.0
[09.03.2015 15:22:56.587]Modul-GetOsInfo=Start
[09.03.2015 15:22:56.587]BuildNumber=3790
[09.03.2015 15:22:56.587]MajorVersion=5
[09.03.2015 15:22:56.587]MinorVersion=2
[09.03.2015 15:22:56.587]PlatformId=2
[09.03.2015 15:22:56.587]CSDVersion=Service Pack 2
[09.03.2015 15:22:56.587]ProductType=3
[09.03.2015 15:22:56.587]ServicePackMajor=2
[09.03.2015 15:22:56.587]ServicePackMinor=0
[09.03.2015 15:22:56.587]SuiteMask=16
[09.03.2015 15:22:56.587]Modul-GetOsInfo=End (Void)
[09.03.2015 15:22:56.587]PrinterName=PDFCreator
[09.03.2015 15:22:56.587]JobId=186
[09.03.2015 15:22:56.587]GetClientComputer=Start
[09.03.2015 15:22:56.587]OpenPrinter=True
[09.03.2015 15:22:56.587]pjob->pMachineName=\\SRVDEV
[09.03.2015 15:22:56.587]GetClientComputer=END
[09.03.2015 15:22:56.587]GetClientComputer=\\SRVDEV
[09.03.2015 15:22:56.587]GetUserInfo=Start
[09.03.2015 15:22:56.587]GetUserInfo=END
[09.03.2015 15:22:56.587]UserName=axl
[09.03.2015 15:22:56.587]GetSessionInfo=Start
[09.03.2015 15:22:56.602]GetSessionInfo=End
[09.03.2015 15:22:56.602]SessionId=3
[09.03.2015 15:22:56.602]SessionName=RDP-Tcp#211
[09.03.2015 15:22:56.602]TestTempPath=C:\WINDOWS\TEMP\
[09.03.2015 15:22:56.602]GetUserEnvBlock=Begin
[09.03.2015 15:22:56.602]GetUserEnvBlock=End
[09.03.2015 15:22:56.602]RegOpenKeyEx failed=The system cannot find the file specified.

[09.03.2015 15:22:56.602]PDFServer=FALSE
[09.03.2015 15:22:56.602]Modul-GetUserTmpPath=Start
[09.03.2015 15:22:56.602]UserTmp=C:\DOCUME~1\axl\LOCALS~1\Temp
[09.03.2015 15:22:56.602]Modul-GetUserTmpPath=End (True)
[09.03.2015 15:22:56.602]TmpPath=C:\DOCUME~1\axl\LOCALS~1\Temp\PDFCreator\Spool
[09.03.2015 15:22:56.602]Modul-GetDatFileName=Start
[09.03.2015 15:22:56.602]pDatFile=E11FACE0756F493CB0CC2E9EF3460C8F.inf
[09.03.2015 15:22:56.602]Modul-GetDatFileName=End (True)
[09.03.2015 15:22:56.602]PostscriptFile=C:\DOCUME~1\axl\LOCALS~1\Temp\PDFCreator\Spool\E11FACE0756F493CB0CC2E9EF3460C8F.ps
[09.03.2015 15:22:56.602]PostscriptFileName=E11FACE0756F493CB0CC2E9EF3460C8F.ps
[09.03.2015 15:22:56.602]DocName=Impression
[09.03.2015 15:22:56.602]OpenPrinter=True
[09.03.2015 15:22:56.602]Modul-PdfStartDocPort=End (True)
[09.03.2015 15:22:56.965]Modul-CreateDatFile=Start
[09.03.2015 15:22:56.965]Modul-CreateDatFile=End (True)
[09.03.2015 15:22:56.965]StartPdfCreator=Begin
[09.03.2015 15:22:56.965]=  /INFODATAFILE=“C:\DOCUME~1\axl\LOCALS~1\Temp\PDFCreator\Spool\E11FACE0756F493CB0CC2E9EF3460C8F.inf”
[09.03.2015 15:22:56.965]=C:\Program Files\PDFCreator\PDFCreator.exe
[09.03.2015 15:22:56.980]StartPdfCreator=End
This one is made on Windows server 2008 R2 SP1 (64bits) :
[09.03.2015 15:22:56.587]-------------------- = --------------------
[09.03.2015 15:22:56.587]Modul-PdfStartDocPort=Start
[09.03.2015 15:22:56.587]DLL-FileVersion=0.5.1.0
[09.03.2015 15:22:56.587]Modul-GetOsInfo=Start
[09.03.2015 15:22:56.587]BuildNumber=3790
[09.03.2015 15:22:56.587]MajorVersion=5
[09.03.2015 15:22:56.587]MinorVersion=2
[09.03.2015 15:22:56.587]PlatformId=2
[09.03.2015 15:22:56.587]CSDVersion=Service Pack 2
[09.03.2015 15:22:56.587]ProductType=3
[09.03.2015 15:22:56.587]ServicePackMajor=2
[09.03.2015 15:22:56.587]ServicePackMinor=0
[09.03.2015 15:22:56.587]SuiteMask=16
[09.03.2015 15:22:56.587]Modul-GetOsInfo=End (Void)
[09.03.2015 15:22:56.587]PrinterName=PDFCreator
[09.03.2015 15:22:56.587]JobId=186
[09.03.2015 15:22:56.587]GetClientComputer=Start
[09.03.2015 15:22:56.587]OpenPrinter=True
[09.03.2015 15:22:56.587]pjob->pMachineName=\\\\SRVDEV
[09.03.2015 15:22:56.587]GetClientComputer=END
[09.03.2015 15:22:56.587]GetClientComputer=\\\\SRVDEV
[09.03.2015 15:22:56.587]GetUserInfo=Start
[09.03.2015 15:22:56.587]GetUserInfo=END
[09.03.2015 15:22:56.587]UserName=axl
[09.03.2015 15:22:56.587]GetSessionInfo=Start
[09.03.2015 15:22:56.602]GetSessionInfo=End
[09.03.2015 15:22:56.602]SessionId=3
[09.03.2015 15:22:56.602]SessionName=RDP-Tcp#211
[09.03.2015 15:22:56.602]TestTempPath=C:\\WINDOWS\\TEMP\\
[09.03.2015 15:22:56.602]GetUserEnvBlock=Begin
[09.03.2015 15:22:56.602]GetUserEnvBlock=End
[09.03.2015 15:22:56.602]RegOpenKeyEx failed=The system cannot find the file specified.

[09.03.2015 15:22:56.602]PDFServer=FALSE
[09.03.2015 15:22:56.602]Modul-GetUserTmpPath=Start
[09.03.2015 15:22:56.602]UserTmp=C:\\DOCUME~1\\axl\\LOCALS~1\\Temp
[09.03.2015 15:22:56.602]Modul-GetUserTmpPath=End (True)
[09.03.2015 15:22:56.602]TmpPath=C:\\DOCUME~1\\axl\\LOCALS~1\\Temp\\PDFCreator\\Spool
[09.03.2015 15:22:56.602]Modul-GetDatFileName=Start
[09.03.2015 15:22:56.602]pDatFile=E11FACE0756F493CB0CC2E9EF3460C8F.inf
[09.03.2015 15:22:56.602]Modul-GetDatFileName=End (True)

[09.03.2015 15:22:56.602]PostscriptFile=C:\\DOCUME~1\\axl\\LOCALS~1\\Temp\\PDFCreator\\Spool\\E11FACE0756F493CB0CC2E9EF3460C8F.ps
[09.03.2015 15:22:56.602]PostscriptFileName=E11FACE0756F493CB0CC2E9EF3460C8F.ps
[09.03.2015 15:22:56.602]DocName=Impression
[09.03.2015 15:22:56.602]OpenPrinter=True
[09.03.2015 15:22:56.602]Modul-PdfStartDocPort=End (True)
[09.03.2015 15:22:56.965]Modul-CreateDatFile=Start
[09.03.2015 15:22:56.965]Modul-CreateDatFile=End (True)
[09.03.2015 15:22:56.965]StartPdfCreator=Begin
[09.03.2015 15:22:56.965]=  /INFODATAFILE="C:\\DOCUME~1\\axl\\LOCALS~1\\Temp\\PDFCreator\\Spool\\E11FACE0756F493CB0CC2E9EF3460C8F.inf"
[09.03.2015 15:22:56.965]=C:\\Program Files\\PDFCreator\\PDFCreator.exe
[09.03.2015 15:22:56.980]StartPdfCreator=End

Thanks for your help.

Axl

Hi ! 


I just wanted to say that the new version 2.1 solve my problem !

Except that i can not use the next COM object anymore :
Set oPDFc = CreateObject(“PDFCreatorBeta.PDFCreator”)

But the PDFCreator COM object was not so important. JobQueue works and this is the most important.

It was perhaps the use of both objects that was the issue. How knows…


Thanks to PDFCreator team !


Hi,


thanks for the feedback, we will also have a look at the “new” problem.

best regards,


Hey, 


we have changed the ProgID of the PDFCreator object to: “PDFCreatorBeta.PDFCreatorObj”. You can look it up in the manual. 

Hope, that this will fix your problem.

best regards,
Sazan

It’s fixed ! Thanks a lot. :slight_smile:

Great to hear that! :slight_smile: