PDF-XChange - Tracker PDF Viewer - TIFF-XChange - Image-XChange - XMF-XChange - Raster-XChange - Support

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

 
apx
User
Topic Author
Posts: 18
Joined: Tue Sep 12, 2017 1:43 pm

Correct Syntax for add/edit Custom Forms

Tue Dec 05, 2017 12:47 pm

Hi,

I do not understand the documentation here. How do I have to proceed to create a template or change an existing one?

PDFPrinter.Option["CustomForms.ID"] = "Test"
PDFPrinter.Option["CustomForms.Name"] = "Test"
PDFPrinter.Option["CustomForms.Unit"] = 0
PDFPrinter.Option["CustomForms.Width"] = 1230
PDFPrinter.Option["CustomForms.Height"] = 1230

Is that the correct Syntax? I would like to take over the formats of a real printer to create PDF documents in the paper format.

http://help.tracker-software.com/pdfxpsdk6/index.html?custom-forms.html
 
Ivan - Tracker Software
Site Admin
Posts: 3508
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada
Contact:

Re: Correct Syntax for add/edit Custom Forms

Fri Dec 22, 2017 7:37 pm

Unfortunately, there is no way to add custom form using API. Instead, you have to setup paper size using DEVMODE as for any regular printer, or, you can use undocumented "DevMode" section:
PDFPrinter.Options["DevMode.PapSize"] = 256; // stands for DMPAPER_CUSTOM
PDFPrinter.Options["DevMode.CWidth"] = 1230;
PDFPrinter.Options["DevMode.CHeight"] = 1230;
PDFPrinter.ApplyOptions(0);

Please note, that will work for V5/V6. In V7, "DevMode" section was removed and its options are available in "Paper" section. So, in V7 the same task can be done in the following way:

PDFPrinter.Options["Paper.Size"] = 256; // stands for DMPAPER_CUSTOM
PDFPrinter.Options["Paper.CWidth"] = 1230;
PDFPrinter.Options["Paper.CHeight"] = 1230;
PDFPrinter.ApplyOptions(0);


P.S. To get all available options, you can run on cmd.exe and run a command:
"%ProgramFiles%\Tracker Software\PDF-XChange 6\pdfSaver6.exe" /DumpOption /Printer "PDF-XChange Standard V6"


or, in case of V7:
"%ProgramFiles%\Tracker Software\PDF-XChange Standard\pdfSaver.exe" /DumpOptions /Printer "PDF-XChange Standard"
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.
 
apx
User
Topic Author
Posts: 18
Joined: Tue Sep 12, 2017 1:43 pm

Re: Correct Syntax for add/edit Custom Forms

Tue Jan 09, 2018 10:11 am

Thanks, that will help me.
 
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 12678
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Correct Syntax for add/edit Custom Forms

Tue Jan 09, 2018 3:40 pm

:D

Who is online

Users browsing this forum: No registered users and 1 guest