LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-REPORT to Acrobat .PDF File Generation

Using CVI 8.0.1, I am successful at using NI-Reports to generate a .PDF output to an Acrobat distiller printer.  What I would like to do is to pass a  .PDF file path name  to Acrobat so that it will use it for saving the output to this specific destination.  What are the approaches to doing this?  Any examples?

For future reference, are there other nifty alternatives toward generating .PDF output files besides using Acrobat?
0 Kudos
Message 1 of 19
(4,885 Views)
Hi Steve,

If I understand you correctly, you would like to save the report to disk rather than print it out. If this is the case, please refer to the instructions in this knowledge base:
How to Save a Report Generated with NI-Reports in LabWindows/CVI, Measurement Studio for Visual C++,...

Regards,
0 Kudos
Message 2 of 19
(4,833 Views)
Yes,  I want to save it to a file.  Refering to paragraph 9 in the link you provided above, when the popup occurs asking for a filename to use, I want my CVI program to  the specific default file path and name to the popup.  How can CVI pass this file path?
0 Kudos
Message 3 of 19
(4,830 Views)
Hi Steve,

Unfortunately, there is no way to specify the file path for that dialog using the NI-Reports API. NI-Reports was not developed with printing to files in mind, so the solution discussed in the knowledge base should only be considered a work-around at best.

Regards,
0 Kudos
Message 4 of 19
(4,786 Views)
Here is your answer.
 
 
Free.
You specify filename. with prompts or without prompts
Thanks.
CVI 2010
LabVIEW 2011 SP1
Vision Builder AI 2011 SP1
0 Kudos
Message 5 of 19
(4,769 Views)
Thankyou for your suggestion on using GhostScript to produce a PDF file with forward file output naming directives (and perhaps much more).   It is still not clear how I associate GhostScript with an NI-Reports handle?   Or do I abandon NI-Reports altogether and use the GhostScript .DLL to generate reports in a GhostScript environment?  Please explain further...
0 Kudos
Message 6 of 19
(4,723 Views)
Hi Steve,

You cannot associate your NI-Reports handle with GhostScript. You should be able to use GhostScript with CVI, but there is no built in functionality to do so.

Regards,
0 Kudos
Message 7 of 19
(4,680 Views)
Thankyou all for your comments.  I did more investigation with Sheetal's earlier suggestion and got it to work.   I am able to send an NI-Report generation to a PDF printer and build a PDF file, then subsequently view the .PDF file upon demand.  What's more, I can programmatically specify the path and file name of this file within my CVI program.   With just a few more features that could hopefully someday be supported by NI-Reports (or a tool-kit)  then this adds another  powerful tool to CVI.

Steve M.
0 Kudos
Message 8 of 19
(4,673 Views)
It would be nice if NI would take the extra step to build prgrammable document saving functionality into the NI Report library. I found NI Report fairly easy to use but when it comes down to saving the document, I find the workaround a less desirable solution. It should be a programmable solution not a workaround. Hopefully, NI will take the hint after and take the extra step.
0 Kudos
Message 9 of 19
(4,526 Views)
Hi Steve,
Could you please explain how you got it worked?
How do you pass the file path to the PDF printer programmatically?
Is that a feature of the PDF printer that is explotied by using command-line parameters for example?
 
I once used the "Haru's pdf library" from SourceForge. It is a library that lets you write text and do some drawing but it is not very easy to use.
S. Eren BALCI
IMESTEK
0 Kudos
Message 10 of 19
(4,520 Views)