• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. PCB Design
  3. Creating .PDF using Tcl/Tk Utilities in Capture 16.3

Stats

  • Locked Locked
  • Replies 22
  • Subscribers 171
  • Views 16976
  • Members are here 0
More Content
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Creating .PDF using Tcl/Tk Utilities in Capture 16.3

Goblin60
Goblin60 over 14 years ago

 All,

Here's somthing a little different. I'd like to export a .pdf using the application found in  Accesories--->Cadence Tcl/Tk utilites. This gizmo (when working) produces a searchable pdf which allows one to click on components within the pdf and see properties. I've seen this work in older versions of software. Here's the hitch; I need the postscript driver path for the .pdf editor Bluebeam. I can also use the postscript friver path for Adobe Acrobat Distiller but I prefer to use Bluebeam. Attached is a .png that shows you what I am refering to. Any info will be appreciated.

Cheers,

Ron Scott

  • pdf_question.png
  • View
  • Hide
  • Cancel
  • oldmouldy
    oldmouldy over 14 years ago

    Fundamentally, you need to alter the provided script, it's not a big deal but, without some careful consideration, this stuff is pretty easy to break. If you are happy to "hack" the code, try the following:

    Take a copy of the capPdfUtil.tcl in the tools\capture\tclscripts\capUtils, you need to be able to go back to this if everything goes bad.

    Open the capPdfUtil.tcl flle with a plain text editor, like Notepad. Locate the ::capPdfUtil::populateDefaultPSToPDFConverterList entry, you can see that this loads the mPSToPDFConverterList, follow the same format as the other entries and set another entry for your PS to PDF converter, you need a name for the converter, the exe to call, and any command switches to get the converter to run and create the PDF. Save the file. If all is well, you should be able to run the PDF export and pick your converter.

    Another "nice to have" is to set your prefered converter to be "already selected", you can do this in the ::capUtil::init section, change the number for the "set ::capPdfUtil::mPSToPDFConverterOptionIndex" line to the required index, in the default program, 0 is Acrobat, 1 is Ghostscript, 2 is Custom, this means that you won't have to pick the converter every time.

    A couple of things to note:

    If Bluebeam will not convert Postscript to PDF, this will not work. The PDF Export works by creating a Postscript file using a Postscript printer creating a file and then running that into a converter to create the PDF.

    If you get a hotfix, it may overwrite the capPdfUtil.tcl file, so have another copy of your modifications. You will need to add your changes again to get the benefit of whatever the hotfix might have changed.

    I am not the author of this utility and, like anything to do with computers and programming, making changes like this might work brilliantly or fail dismally.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • hobbss
    hobbss over 14 years ago

     I was initially able to get this to work, but no longer...

    Original setup:

    OrCAD 16.3
    Ghostscript 9
    Adobe 9.4

    When executing the utility, I would use "Ghostscript/equivalent" for the PS to PDF converter, and change the path to gswin32c.exe, including the whole "C:\Program Files...".

    This worked with no problem for a few days. Now, however, now the utility crashes, with an error message: "Postscript Driver not found." This is not a path issue (that gives a different error). The utility is also creating a 0kb ps file in the project output directory before crashing.

    Has anyone seen this, and if so, how were they able to fix it?

    In the interim, I had updated Adobe reader to version X, but have since reverted back to 9.4.  I have uninstalled ghostscript and reinstalled it.  Given that this error is different from when it can't find gswinc32.exe at all, I am not sure if the problem is with ghost script, adobe, or something else.

     Any suggestions would be appreciated.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Goblin60
    Goblin60 over 14 years ago

     Thanks so much for your input. I am happy to hack so this will be an adventure. A colleague did have this work for a few days and then it stopped working.

    Cheers,

    Ron Scott

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • oldmouldy
    oldmouldy over 14 years ago

    I can't find a "Postscript Driver not found" message in the script, there is a "not found" like message for the PS to PDF Converter in the script. The "Postscript Driver" edit box in the UI is expecting exactly the name of your Postscript printer, the one that you configured as a "Print to File" Postscript printer.

    As a first shot, I would recommend that you add the path to the "gswin32c.exe" to the PATH environment variable, TCL seems to like being a bit UNIX like in terms of directory slashes and so on and may not admire being faced with "alien" directory slashes and a directory that contains spaces, like "C:\Program Files\....."

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • hobbss
    hobbss over 14 years ago

     That's what is so confusing --> I couldn't find the error message in the code either.

     I have already tried adding the the path to gswin32c.exe to the PATH environment variable -- no change (still doesn't work).

     I haven't actually configured a "Printe to File" Postcript printer.  All I did was install ghostscript, and then point Capture to gswin32c.exe.  This worked originally with no issues (I didn't even need to change the PATH environment variable).  Because nothing changed in Capture, and because I can't find the error text in the script, I think it must be some kind of system error.  I just don't know what...

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
>
Cadence Guidelines

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information