Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Export as PDF file

Hi ,

i am facing one issue while exporting through QlikviewPDF or Bullzip PDF. the issue is i am always getting SAVE AS window.

how can i avoid and set default path. My script look like this. and i am using Window 7 x64 bit machine.

'------------------------------------------ Bullzip-----------------------------------------------------

Sub ExportAndMail

    'ActiveDocument.reload

    vReport = "RP02" 'Set report

    vName = "QlikView Printing" 'Name of output pdf

    ActiveDocument.PrintReport(vReport), "Bullzip PDF Printer", false  'Printreport

    reportFile = "C:\Users\Gaurav\Desktop\" & vName &".pdf" 'Setting outputname

    MyPrintPDFWithBullZip(reportFile) 'Call pdf printer

    ActiveDocument.GetApplication.Sleep 5000

    mailrapport()

    ActiveDocument.Save

    ActiveDocument.GetApplication.Sleep 5000

   ' ActiveDocument.GetApplication.Quit

End sub

FUNCTION MyPrintPDFWithBullZip (pdfOutputFile)

     set obj = CreateObject("Bullzip.PDFPrinterSettings")

    obj.SetValue "Output" , pdfOutputFile

    obj.SetValue "ConfirmOverwrite", "No"

    obj.SetValue "ShowSaveAS", "never"

    obj.SetValue "ShowSettings", "never"

    obj.SetValue "ShowPDF", "no"

    obj.SetValue "RememberLastFileName", "no"

    obj.SetValue "RememberLastFolderName", "no"

    obj.SetValue "ShowProgressFinished", "no"

    obj.SetValue "ShowProgress", "no"

    obj.WriteSettings True

END FUNCTION

'--------------------------------------------------------------------------------------------------------

Sub GeneratePDF ' QlikviewPDF

        vReport = "RP01"

        vName = "QlikView Printing" 'Name of output pdf

        reportFile = "C:\Users\Gaurav\Desktop\" & vName &".pdf" 'Setting outputname

        printReportPDF vReport, reportFile

        ActiveDocument.GetApplication.Sleep 5000

End sub

function printReportPDF(oReport, pdfOutputFile) 'PDF-XChange version 3.0

          Set WSHShell = CreateObject("WScript.Shell")

          WSHShell.RegWrite "HKCU\Software\QlikViewPDF\OutputFile", pdfOutputFile, "REG_SZ"

          WSHShell.RegWrite "HKCU\Software\QlikViewPDF\BypassSaveAs", "1", "REG_SZ"

          ActiveDocument.PrintReport oReport, "QlikViewPDF", false

          set WSHShell = nothing

end function

'--------------------------------------------------------------------------------------------------------------

Appreciate your help.

Gaurav

1 Reply
Not applicable
Author

any guess please!