Printing pdfs with PDF-XChange Core API SDK

A forum for questions or concerns related to the PDF-XChange Core API SDK

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan

Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.

When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
JDobratzLakeco
User
Posts: 2
Joined: Fri Apr 07, 2023 2:44 pm

Printing pdfs with PDF-XChange Core API SDK

Post by JDobratzLakeco »

I am currently using PDF-XChange Core API SDK version 7. I'm trying to upgrade to version 9. I've installed version 9, but I cannot find how to create a new printer and print a pdf like the code I have in 7. In the 7 version, there were COM objects that were exposed and I could reference them and I have code that looks like the following... How could I accomplish the same in the 9 version of the code?

Dim PDFPFactory As PXCComLib7.CPXCControlEx
Dim WithEvents PDFPrinter As PXCComLib7.CPXCPrinter
PDFPrinter = CType(PDFPFactory.Printer("", "PDF-XChange 7.0 DTPOLL", g_RegKey, ""), CPXCPrinter)
PrinterName = PDFPrinter.Name
PDFPrinter.SetAsDefaultPrinter()
PDFPrinter.Option(“All sorts of options”) = "value"
shellEx = New ProcessShellExecute()
shellEx.FileName = FileName
shellEx.Verb = "printto"
shellEx.Arguments = """" + PrinterName + """"
shellEx.Execute()
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3556
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada

Re: Printing pdfs with PDF-XChange Core API SDK

Post by Ivan - Tracker Software »

This code should work with V9 without any changes.
But you have to install Driver API, not the Core API.
Tracker Software (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.