Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Export a pdf.

Hi all, I want to export pdf but i'm having a problem because the code i'm using print the pdf and export it. I only want to export....

Here is the code:

set WSHShell = CreateObject("WScript.Shell")
WSHShell.RegWrite "HKCU\Software\QlikViewPDF\OutputFile", "E:\util\MailQV\Cohortes.PDF", "REG_SZ"
WSHShell.RegWrite "HKCU\Software\QlikViewPDF\BypassSaveAs", "1", "REG_SZ"
ActiveDocument.PrintReport "RP01", "QlikviewPDF", false
set WSHShell = nothing

Thanks!!

24 Replies
pkelly
Specialist
Specialist

I do the following....

sub printRP01
printReportPDF "C:\QlikViewDocuments\Timbmet_PDF\18T.pdf"
ActiveDocument.GetApplication.Sleep 2000
ActiveDocument.PrintReport "RP01", "QlikviewPDF"
ActiveDocument.GetApplication.Sleep 10000
end sub
'===========================================================================
Function printReportPDF(pdfOutputFile)

Set WSHShell = CreateObject("WScript.Shell")
WSHShell.RegWrite "HKCU\Software\QlikviewPDF\OutputFile", pdfOutputFile, "REG_SZ"
WSHShell.RegWrite "HKCU\Software\QlikviewPDF\BypassSaveAs", "1", "REG_SZ"
Set WSHShell = nothing

End function
'===========================================================================

I have a button which calls the macro "printRP01"...

Regards

Paul

pkelly
Specialist
Specialist

Forgot to add...

I downloaded the QlikView PDF printer - available from downloads

Not applicable
Author

Thanks for your reply, Where can i download the qlikviewPDF. I have it install but i will download again.

I'm going to http://global.qlik.com/download/ but I don't find this.

Not applicable
Author

I have tested but id did the same. It's printing the pdf. Do you know other way yo export only???

Tkss

Not applicable
Author

I used pdfcreator in my app.

// Create instance of PDFcreatore

Set PDFCreator = CreateObject("PDFCreator.clsPDFCreator")

PDFCreator.cOption("UseAutosave") = 1 // Enable autosave

PDFCreator.cOption("UseAutosaveDirectory") = 1 // Use a specific save directory

PDFCreator.cOption("AutosaveDirectory") = ActiveDocument.getVariable("TempPath").GetContent.String // Set autosave directory

PDFCreator.cOption("AutosaveFormat") = 0 // Use PDF file type (.PDF extension)



PDFCreator.cOption("AutosaveFilename") = "My PDF" // set the filename, optionally you can get the Caption of the object and use it as Filename

PDFCreator.cPrinterStop = FALSE

// Export to PDF File

ActiveDocument.PrintDocReport ReportID, "PDFCreator"



Not applicable
Author

Thanks Glen, it's working for me. But I have a problem. I have instaled PDFCreator en the server as a service. But when i try to run the macro via web on the client i have an error because I don't have in the client's machine the pdfcreator install.


How are you working???

Thanks a lot!!

suniljain
Master
Master

Dear Glenn,

I get following error whem using your code.

ActiveX component can't create object: 'PDFCreator.clsPDFCreator'

Regards

Sunil;



suniljain
Master
Master

Execution Stop on following line

'Export to PDF File

ActiveDocument.PrintDocReport ReportID, "PDFCreator"



Not applicable
Author

Dear Sunil,

Use the following line
ActiveDocument.PrintDocReport "RP01", "PDFCreator"