First of all, I hope I'm posting in the correct forum, as I'm using PDF-XChange Drivers API SDK V6. I assume though, that there is no difference compared to V4/V5.
In the Drivers API 2012 (I haven't found one for V6) you state: "We provide a comprehensive installation executable for developer's to distribute with their application and this is the ONLY method authorized for distribution...".
I have noticed though, that you also offer merge modules to download on the "PDF-XChange Drivers API" download page. In a post from 2014 (https://forum.pdf-xchange.com/ ... WiX#p84591) I saw that somebody was using these merge modules to integrate the installation of the printer driver into their own MSI.
Based on that, I've tried to integrate the merge module into our WiX project (see snippet below), which successfully integrated the driver into our installer. Unfortunately, after execution of the said installer, a directory with the files contained within the merge module was created (C:\PDF-XChange 6\) along with a set of registry keys, but our application failed when attempting to generate a virtual printer.
Code: Select all
<DirectoryRef Id="TARGETDIR">
<Merge Id="PDFXChange60PrinterDriver" SourceFile="C:\path\to\module\Driver6_MSM_x86.msm" DiskId="1" Language="0"/>
</DirectoryRef>
<Feature Id="VCRedist" Title="PDF-XChange 6.0 Printer Driver" AllowAdvertise="yes" Display="expand" Level="1">
<MergeRef Id="PDFXChange60PrinterDriver"/>
</Feature>
1. No driver installation (neiter using PDFX6SA_sm.exe nor the merge module):
Code: Select all
2017.05.05 13:10:21.261253: Initializing printer...
#### Error: Retrieving the COM class factory for component with CLSID {636AC372-D9F0-4548-8B67-E53795556624} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.Activator.CreateInstance(Type type)
at PDF_XChange_Driver_Test.FrmMain.initPrinter(String outputDateiname) in c:\users\numerobis\documents\visual studio 2015\Projects\PDF XChange Driver Test\PDF XChange Driver Test\FrmMain.cs:line 63
at PDF_XChange_Driver_Test.FrmMain.btnTest_Click(Object sender, EventArgs e) in c:\users\numerobis\documents\visual studio 2015\Projects\PDF XChange Driver Test\PDF XChange Driver Test\FrmMain.cs:line 123
2. Driver installation using merge module (Driver6_MSM_x86.msm):
Code: Select all
2017.05.05 08:10:54.779307: Initializing printer...
#### Error: Error HRESULT E_FAIL has been returned from a call to a COM component.
at PXCComLib6.IPXCControlEx.get_Printer(String pServerName, String pPrinterName, String pRegKey, String pDevCode)
at PDF_XChange_Driver_Test.FrmMain.initPrinter(String outputDateiname) in c:\users\numerobis\documents\visual studio 2015\Projects\PDF XChange Driver Test\PDF XChange Driver Test\FrmMain.cs:line 64
at PDF_XChange_Driver_Test.FrmMain.btnTest_Click(Object sender, EventArgs e) in c:\users\numerobis\documents\visual studio 2015\Projects\PDF XChange Driver Test\PDF XChange Driver Test\FrmMain.cs:line 128
- Tried it without and with restart, both yielding the same result.
- During un-installation the installer claimed that "pdfSaver for PDF-XChange Printer V6" is still running and asked what do to with it (wait or close it automatically).
- No printer shows up in the "Devices and Printers". (As expected .. don't care about that).
3. Driver installation using PDFX6SA_sm.exe:
Code: Select all
2017.05.05 14:10:54.070314: Initializing printer...(PDF-XChange Standard V6 Numerobis-Temp) Done!
2017.05.05 14:10:55.079652: Test: Printing document...
2017.05.05 14:10:56.350867: PrintPage: Printing a page...
2017.05.05 14:10:56.476096: PrintPage: page printed!
2017.05.05 14:10:56.928431: Test: document printed!
2017.05.05 14:10:56.942158: Document [PDFXChange Test Document] being spooled by application: [PDF XChange Driver Test.exe]
2017.05.05 14:10:57.380590: Document created and saved as: C:\Users\numerobis\Desktop\bin\x86\Release\Output.pdf
2017.05.05 14:10:57.380590: Succesfully finished!
- Works even without a restart.
- Printer shows up in the "Devices and Printers".
So my questions are: Is the merge module meant for a different purpose, and if so for which? If not, then what are we doing wrong?
Best regards!