• 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. Allegro X PCB Editor
  3. How to print report to pdf

Stats

  • Replies 3
  • Subscribers 160
  • Views 6717
  • Members are here 0
More Content

How to print report to pdf

Tolo1996
Tolo1996 over 2 years ago

Hi Everybody,

I am working on a script that generates documentation. I would like to attach a file containing board information and a pick and place file to the assembly drawings. 

I would like to use a report generation tool to create such files and then combine them into one.

I was able to generate the necessary files and attach them to the drawings using the function: 

a=axlRunBatchDBProgram("pdftk" mytext ?silent t ?noUnload t) 

where mytext contains nessesary data like file names etc. And its works, the problem is that the report that i generate using this line:

axlReportGenerate("RAPORT" t "RAPORT.html")

Generate .html file, and i would like to print it into pdf file and then attached it into main file. Butt how to do this? 

I thought you could use the function:

axlShell("setwindow form.report_tab")

axlShell("FORM report_tab print")

Of course, it's not so easy, because nowhere can I find the name of the form responsible for the report

To be clear what I'm talking about, I would like to use the script to "press" the selected button and print the file in a given location

reportview

Another possibility would be to do this by calling an external program, e.g. AcrRd32

Many thanks for your help and advice!

  • Sign in to reply
  • Cancel
  • SandeepVarrier
    SandeepVarrier over 2 years ago

    axlPdfView() can be used to Display a PDF file from Allegro PCB Editor. If just the filename is given, attempts to find the PDF file using Allegro PCB Editor’s PDFPATH variable. Displays the PDF file in an external PDF viewer. On UNIX, the only supported PDF viewer is Acroread. windows uses PDF registered in the windows registry hope 

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Tolo1996
    Tolo1996 over 2 years ago in reply to SandeepVarrier

    Well i need to create that PDF first, so my question is rather how to  print a report to a pdf file. In the manual there is a description of saving the file to .txt or .html format. Is it not possible to automatically print the report? Using some scripts command? 

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Tolo1996
    Tolo1996 over 2 years ago

    I found a solution on my own. The easiest way to print a report in pdf format is to use the Edge browser. It has the advantage that the viewer of Html files built into Cadence does not read them correctly (the tables are problematic) 

    We generate a report and save it to an HTML file:

    axlReportGenerate("RAPORT" t "RAPORT.html")

    Then we call the microsoft edge program (you can also use chrome):

    The pattern of the function looks like this:

    "patch to msedge.exe" –headless --print-to-pdf ="patch where to save pdf""patch to html file"

    I created a few strings to make it easier to pass it to the function:

    Pdf = "C:\\Users\\a.pajewski\\Desktop\\Projekt\\output\\RAPORTPN2P.pdf"

    Html = "C:\\Users\\a.pajewski\\Desktop\\Projekt\\output\\RAPORT.html"

    ms = "C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe"

    And we pass it to the function:

    mytext=sprintf(s "%s  -headless --print-to-pdf=%s %s" ms Pdf Html)

    Run the program with skill levels:

    axlRunBatchDBProgram(ms mytext ?silent nil ?noUnload t ?noProgress t)

    Done

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • 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