![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Auto save PDF with file selection Topic Summary: Created On: 10-May-2007 21:33 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
OK, so here's the deal. I've got a script that I've wrote that uses the printModule function to print the module to an Adobe PDF document. The script automatically selects the Adobe PDF printer by setting the default printer in the registry using the setRegistry() command. I'm using the showPrintDialogs() to hide the print dialog. Now my question is this, when the printModule function is called I still get the file selector asking me where I want to save the pdf file, which is normal, but how do I 1. pass the save location and file name and 2. not display that dialog?
This is the final piece to my puzzle and I'm lost....lol. Thanks in advance. ------------------------- Scott Boisvert Engineering Tools Administrator L-3 Communications - Avionics Systems scott.boisvert@l-3com.com |
|
![]() |
|
![]() |
|
OK...I figured this one out on my own, so in case anyone else is wondering, here's how you can save a module to PDF without the save dialog popping up.
Basically you need to update the registry. You can do this with the "getRegistry" and "setRegistry" functions. First you need to get the default printer, so you can reset it after your done. Create a Buffer or string variable and set it using the "getRegistry" function. Next you need to set the default printer to adobe using the "setRegistry" function. Then using the "setRegistry" function again to pass the file location and name to Adobe Distiller. Print your module to PDF using the printModule command... Then reset the default printer using the "setRegistry" command. See the attached code for an example. ------------------------- Scott Boisvert Engineering Tools Administrator L-3 Communications - Avionics Systems scott.boisvert@l-3com.com |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Auto save PDF with file selection
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.