Printing existing pdf file with overlay in c# code

This Forum is for the use of Software Developers requiring help and assistance for Tracker Software's PDF-Tools SDK of Library DLL functions(only) - Please use the PDF-XChange Drivers API SDK Forum for assistance with all PDF Print Driver related topics or PDF-XChange Viewer SDK if appropriate.

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

Post Reply
slimke
User
Posts: 2
Joined: Thu Feb 06, 2014 10:51 am

Printing existing pdf file with overlay in c# code

Post by slimke »

Hello guys,

my company is using a registered licence for pdf x-change 5 api.
now i want to use the api to set up a temporary printer which should open an existing pdf file, overlay it with another existing pdf file and save it to special path

my code atm looks like this:

Code: Select all

			
PXCComLib5.CPXCControlEx prnFactory = new PXCComLib5.CPXCControlEx();
_pdfPrinter = (PXCComLib5.CPXCPrinter)prnFactory.get_Printer("", "Simple PDF-XChange 2012", "<regCode>", "<devCode>");
			
_pdfPrinter.ResetDefaults();
_pdfPrinter.Option["Save.File"] = @"\\my\path\to\the\final\output\file.pdf";
_pdfPrinter.Option["Save.SaveType"] = 2;
_pdfPrinter.Option["Save.ShowSaveDialog"] = "no";
_pdfPrinter.Option["Saver.ShowProgress"] = "no";
_pdfPrinter.Option["Save.WhenExists"] = "Overwrite";
_pdfPrinter.Option["Save.RunApp"] = "Yes";
_pdfPrinter.Option["Overlay.Enabled"] = "Yes";
_pdfPrinter.Option["Overlay.OverlayFile"] = @"\\my\path\to\the\overlay\file.pdf";
im missing some parameter/property where i can set up the original pdf file (which should be overlayed) like
_pdfPrinter.Option["Open.File"] = @"\\my\path\to\the\file\that\should\be\overlayed.pdf";
Is there any way to realize this? If "yes"...how?! :shock: :lol:
Thank's for your support!
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17906
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Printing existing pdf file with overlay in c# code

Post by Tracker Supp-Stefan »

Hello slimke,

The printing drivers are designed to only create new files, and there is the Overlay option, but that can only be applied to newly "printed" files, so you will need to either "repritnt" the original document through the drivers, or use the PDF Tools SDK to do the overlay:
https://www.pdf-xchange.com/product/pdf-tools-sdk

Regards,
Stefan
slimke
User
Posts: 2
Joined: Thu Feb 06, 2014 10:51 am

Re: Printing existing pdf file with overlay in c# code

Post by slimke »

thx for info!
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17906
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Printing existing pdf file with overlay in c# code

Post by Tracker Supp-Stefan »

:)
Post Reply