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. To accomplish this, you must modify the 'titrules.js' which is located in your printer install directory. This is the JavaScript file referenced to determine the document name or the "title rules".

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