Knowledgebase

Back to Articles List

How do I customize the output file name when third-parties utilize the PDF-XChange Print Driver?

Question:

How do I customize the output file name when third-parties utilize the PDF-XChange Print Driver?

Please note that a developer asked this question on the Tracker Software forum. They were using build 0150 of the Print Driver with Revit MEP. When they generated PDF files in this manner the file name followed the format:

"Model name - Sheet - Sheet Number - Sheet Name".

They wanted to use only the Sheet Number as the file name.

Answer:

JavaScript must be used to edit the default file name of output documents, as applications pass the file name to Windows automatically when documents are printed and this determines the final file name.

Please see page 49 of the PDF-XChange Help file (PDFX4Man.pdf), which provides a brief description of using JavaScript to modify the settings for 'titrules.js'. This is the JavaScript used to name files.

JavaScript is relatively simple to use. There are many tutorials available online, such as those detailed below: 

http://www.w3schools.com/js/default.asp
http://www.webdevelopersnotes.com/tutorials/javascript/
http://www.webteacher.com/javascript/
http://www.wdvl.com/Authoring/JavaScript/Tutorial/

A sample titrules.js file that has been modified to work with Revit MEP is available here.

Was this article helpful?
Yes No Somewhat