05-13-2014 11:45 AM
Having the ability to generate PDF files from LabVIEW is a rather common request. I recently discovered a very simple way to generate PDFs from LabVIEW with a quick modification to some existing NI software. First, you must have the following products installed:
If you have all of this software, then open vi.lib\addons\_office\_wordsub.llb\Word_Save_Document.vi and make the following modification:
More specifically, add the ".pdf" case with a value of "17" inside. Now, if you wire the path to a PDF file to the Save Report to File.vi for a Word report, then a PDF file will be generated:
We will try to get this change into the Report Generation Toolkit in a future version. I realize that this trick doesn't solve all the use cases (like PDF generation on a system without Word installed), but I'm hoping that it can help out some people today.
05-13-2014 12:50 PM
Hello Darren,
I wonder if this tricks works for a Excel report as well.
UliB
05-13-2014 03:35 PM - edited 05-13-2014 03:35 PM
Or if you don't have Report Generation Toolkit for Microsoft Office (which, I think, is not so cheap) you can just simply install PDF Creator and use it as a printer in Easy Text Report.vi 🙂 Solution with some faults but cheaper...
05-13-2014 04:16 PM
@UliB wrote:
I wonder if this tricks works for a Excel report as well.
Yes, I was able to get it to work with Excel with a similar edit to vi.lib\addons\_office\_exclsub.llb\Excel_Save_Workbook.vi. Some things to keep in mind:
I'm not 100% sure about the Excel 2007 scenario, because I didn't have a test machine available to try it out. But for Excel 2010 and later, it definitely works.
05-14-2014 02:00 AM
run this vi,i have an error code 1498,how to solve it
05-14-2014 09:00 AM
@happy_learning wrote:
run this vi,i have an error code 1498,how to solve it
How does this have anything to do with this thread? Go to the main menu of the LabVIEW forum and click on the "New Message" button located to the left, just above the list of topics.
05-14-2014 10:28 AM
@happy_learning wrote:
run this vi,i have an error code 1498,how to solve it
Have you installed the Report Generation Toolkit?
05-14-2014 12:30 PM - edited 05-14-2014 12:34 PM
Seeing as the RGT is LVOOP based, technically you could just extend it without having to modify existing toolkit funcitonality, which would then break if someone loaded the code on a different machine without this instance of the "save" in vi.lib
08-19-2015 03:54 PM
FYI to anyone still following this thread, I'm happy to announce that these changes have made it into the Report Generation Toolkit for LabVIEW 2015 and later.
10-06-2016 02:55 PM
Yes great, thanks a million Darren. I am using this capability to save excel pdf files using the RGT. My only problem is that it does not seem to save multipage workbooks. Is there a workaround for this?