I am working on a Print solution in which we perform our own 'banding' in macro code, looping over certain values, then issue a PrintReport for each one.
It is working great to PDF via BullZip. Please see the sample (pseudo-code "A") attached. Thanks to all whose prior contributions (which I exhaustively searched) led to this working on my Windows 7, 64-bit machine.
Now, I have been asked to port the printing solution to use an XPS format. I'll admit, I'd never heard of XPS format, but lo' - I posses a print driver named 'Microsoft XPS Document Writer'. So, I am trying to implement a print macro that uses the RegKey examples that mostly populates the community (e.g. WriteReg for "BypassSaveAs", "OutputFile"...etc.) for the 'QlikViewPDF' printing, wherein the name fo the print-driver matches the RegKey and the .printReport method call parameter.
The sample for macro print to XPS is attached (psuedo-code "B"). The code works for me - it writes the Registry settings, and generates the report, but the printer driver Save-As... dialog pops-up and it won't honor the pre-configured "OutputFile".
Yes - I have the Requested-Module-Security as "System Access" and Current-Local-Security as "Allow System Access"...
I was wondering if anyone has any experience with printing to the standard 'Microsoft XPS Document Writer' print driver? Or, any other XPS print driver? I am guessing that a special approach is needed, such as the BullZipPDF example, which deviates from the typical Regkey method used for 'QlikViewPDF'
Thanks for your response and for sharing your sample qvw.
However, my question pertains strictly to printing as XPS via either the 'Microsoft XPS Document Writer' print driver, or another XPS-based print driver. I am already capable of printing to PDF via the BullzipPDF print driver.
Your sample is reflective of the 'QlikViewPDF' solution, where the RegKey for 'BypassSaveAs' and 'OutputFile' permit un-attended printing to PDF via the QlikViewPDF print driver. Presumably, this RegKey approach would work with numerous other PDF print drivers. It did *not* work with the BullzipPDF. However, another solution for BullzipPDF was located on the QlikView community, and I have that working.
My post and attached psuedo-code clearly stated this (or so I thought). I am looking for assistance with porting any macro-printing solution towards the 'Microsoft XPS Document Writer' or other XPS print driver.
I can successfully print to XPS via 'Microsoft XPS Document Writer', but the print driver is not honoring the 'BypassSaveAs' and 'OutputFile' RegKeys. So, I figure that a custom solution, similar to that of BullzipPDF, might exist.
I am only looking for help with printing to XPS. But thanks..