Help code VBA for pdfcreator v3.4.0


#1

Hola,

Cuando usaba una versión de PdfCreator anterior a la versión v3.4.0. Build 5156 yo no tenía ningún problema para utilizar la siguiente función con mi código VBA en Excel (previo registro de la biblioteca PDFCreator.COM.tlb):

[in Engllish]
When using a version of PdfCreator earlier than version v3.4.0. Build 5156 I had no problem using the following function with my VBA code in Excel (previous registration of the PDFCreator.COM.tlb library):

' PDFCreator COM Interface test for VBA
' Part of the PDFCreator application
'License: GPL
' Homepage: http://www.pdfforge.org/pdfcreator
' Version: 1.0.0.0
' Created: June, 16. 2015
' Modified: June, 16. 2015
'Author: Sazan Hoti
' Comments: This project demonstrates the use of the COM Interface of PDFCreator.
' There are 5 different kinds of usage presented.
' Note: More usage examples then in the VBA directory can be found in the JavaScript directory only.
' IMPORTANT: Set a reference to the pdfcreator.tlb!

Public Sub PrintToPDF(ByVal hoja As String, ByVal sPDFName As String)
_ Dim fullPath_
_ Dim PDFCreatorQueue As Queue_
_ Dim pJob As PrintJob_

_ Set PDFCreatorQueue = CreateObject("PDFCreator.JobQueue")_
_ fullPath = ActiveWorkbook.Path & "" & sPDFName & hoja_

_ 'MsgBox "Initializing PDFCreator queue..."_
_ PDFCreatorQueue.Initialize_

_ 'Set printer if necessary_
_ Application.ActivePrinter = "PDFCreator en Ne00:"_

_ 'MsgBox "Printing the current active document..."_
_ ActiveWorkbook.Sheets(hoja).PrintOut 'Background:=False_

_ 'MsgBox "Waiting for the job to arrive at the queue..."_
_ If Not PDFCreatorQueue.WaitForJob(10) Then_
_ 'MsgBox "The print job did not reach the queue within " & " 10 seconds"_
_ Else_
_ 'MsgBox "Currently there are " & PDFCreatorQueue.Count & " job(s) in the queue"_
_ 'MsgBox "Getting job instance"_
_ Set pJob = PDFCreatorQueue.NextJob_

_ pJob.SetProfileByGuid ("DefaultGuid")_

_ 'MsgBox "Converting under ""DefaultGuid"" conversion profile"_
_ pJob.ConvertTo (fullPath)_

_ If (Not pJob.IsFinished Or Not pJob.IsSuccessful) Then_
_ 'MsgBox "Could not convert the file: " & fullPath_
_ Else_
_ 'MsgBox "Job finished successfully"_
_ End If_
_ End If_

_ 'MsgBox "Releasing the object"_
_ PDFCreatorQueue.ReleaseCom_

End Sub

pero después de actualizar a la versión v3.4.0. Build 5156 ya no puedo utilizarlo porque la biblioteca PDFCreator.COM.tlb ya no se encuentra disponible.
¿Cómo puedo hacer para utilizar este código (u otro similar) con la nueva versión 3.4.0?

[In English]
but after updating to version v3.4.0. Build 5156 I can no longer use that code because the PDFCreator.COM.tlb library is no longer available.
How can I use this code (or similar) with the new version 3.4.0?

Thanks


#2

Hi,

the .tlb should still be available in the current version, please try reinstalling PDFCreator and let us know if this doesn't resolve the issue.

Best regards

Robin


#3

Muchas gracias.

Lo reinstalé de nuevo v3.4.0. y ya me aparece el archivo PDFCreator.COM.tlb.
Tuve que añadir en excepciones de mi antivirus la carpeta pdfcreator porque si no lo hacía ese fichero aparecía durante unos segundos y después desaparecía como por arte de magia

Ahora ya me va ese mismo código con mis funciones VBA de Excel :grinning:

todo OK

Saludos

[Nota: el archivo que sí desaparece por arte de magia es uninstxxx.dat]

[in English]
I reinstalled it again v3.4.0. and I already see the file ** PDFCreator.COM.tlb **.
** I had to add the pdfcreator folder to my antivirus exceptions ** because if it did not, that file would appear for a few seconds and then disappear as if by magic

Now that same code is going with my Excel VBA functions

[Note: the file that does disappear by magic is ** uninstxxx.dat **]


#4

Thanks for the feedback, it sounds a bit like this is just a false alert by your anti virus software.
Which anti virus product are you using? We will try to contact the developers and ask them to remove the false detection. The unins000.dat is however only used during uninstall, so I am not sure how this interfered with the PDFCreator.COM.tlb, or did this also get removed shortly after installing?

Best regards

Robin


#5

Hola,
mi software antivirus es VIPRE.

Intentaré explicarme mejor, cuando yo instalaba de manera "normal" la versión v3.4.0 de pdfcreator, tanto el archivo PDFCreator.COM.tlb como el uninstxxx.dat se instalaban pero después de unos pocos segundos desaparecían, se autoeliminaban. ¿¿??

Entonces probé a meter la carpeta pdfcreator en excepciones del antivirus y entonces el archivo .tlb se mantuvo en la carpeta pero el uninstxxx.dat seguía eliminándose (es un mal menor)

También tuve algún pequeño problema con la configuración del puerto de la impresora pdfcreator, pero este punto ya no sé muy bien cómo explicarlo. Al final lo resolví

Esa es mi experiencia con la v3.4.0.
Yo ya puedo usar la función de imprimir en mis rutinas VBA, ya no tengo ningún problema

Saludos

[In English]

Hello,
my antivirus software is VIPRE.

I will try to explain myself better, when I installed "pdfcreator" version v3.4.0 in a "normal" way, both the PDFCreator.COM.tlb file and the uninstxxx.dat file were installed but after a few seconds they disappeared, they were self-eliminating. ¿??

Then I tried to put the pdfcreator folder in antivirus exceptions and then the .tlb file was kept in the folder but the uninstxxx.dat was still being deleted (it is a lesser evil)

I also had some small problem with the configuration of the pdfcreator printer port, but this point I do not know how to explain it. In the end I solved it

That is my experience with v3.4.0.
I can already use the print function in my VBA routines, I no longer have any problem