LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Save as PDF

Hello,

 

I am trying to save outputs as a PDF file with a password. My outputs are as follows and in top-down order:

  • Header (String)
  • Info (String)
  • Table (String, Double)
  • Extra Info (String, Double)
  • Text (String)
  • Footer (String)

Each section can be longer/taller than a line but will be created within itself, thus a small vi/loop will create the header and wait until assembly and so on.

I have looked into the documentation toolkit but found only HTML, Word and Excel outputs but not PDF, I would like to say that I am trying to perform this task without downloading any add-ons. If you require more information please let me know, will try to give you as much detail as I can.

 

Cheers,

Diural  

0 Kudos
Message 1 of 9
(2,098 Views)

Hi Diural,

 


@Diural wrote:

I have looked into the documentation toolkit but found only HTML, Word and Excel outputs but not PDF,


Create a Word report, then print this report to PDF…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 9
(2,088 Views)

Hey Gerd,

 

Thanks for answering, but I just can't get a hold of an answer. I have created a word document with string input but cannot find how to just convert it to a pdf and save it as is. I am attaching my vi so far (LV2012). Thank you for the help and sorry for the question which seems like and easy one (not for me).

 

Cheers,

Diural

Screenshot 2022-08-31 173005.png

0 Kudos
Message 3 of 9
(2,058 Views)

Hi Diural,

 

in the RGT palette you will find a PrintReport function, and there is a QueryAvailablePrinters function. When there is a PDF printer on your computer installed then it's easy to print to PDF.

 

Another option is to use ActiveX (which RGT is using under the hood anyway) to directly command Word to "SaveAs" PDF document: example found in this LabVIEW board

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 9
(2,052 Views)

@Diural wrote:

I am trying to save outputs as a PDF file with a password.

 

...

 

Each section can be longer/taller than a line but will be created within itself, thus a small vi/loop will create the header and wait until assembly and so on.

I have looked into the documentation toolkit but found only HTML, Word and Excel outputs but not PDF, I would like to say that I am trying to perform this task without downloading any add-ons.

 


( ^ emphasis mine)

 

The report generation toolkit does not support PDF directly. Generating PDFs directly and/or completing PDF forms is possible, but not without additional libraries.

 

What are your requirements for the password? Printing to PDF is the simplest way to convert a Word (or other) report to PDF, but you may be somewhat limited in the ability to set a password depending on the print driver.

0 Kudos
Message 5 of 9
(2,026 Views)

Hi,

 

if you have the Report Generation Toolkit (RGT) and create a word report, you can use Darren's nugget (https://forums.ni.com/t5/LabVIEW/Darren-s-Occasional-Nugget-05-13-2014/td-p/2847152 ) to save the report directly to a PDF file. 

 

If you have LabVIEW2015 or later the needed changes are already in the RGT. 

 

UliB

 

Message 6 of 9
(1,970 Views)

There's also Carya's PDF toolkit. 

I haven't used it much but it has more functions than just converting to PDF, might have the set password function too.

 

wiebe@CARYA knows more about it.

0 Kudos
Message 7 of 9
(1,964 Views)

Our production test group uses Exaprom PDF with LabVIEW to print test reports to PDF similar to this example:

 

PDF Report with ItextSharp

========================
=== Engineer Ambiguously ===
========================
Message 8 of 9
(1,944 Views)

@AeroSoul wrote:

There's also Carya's PDF toolkit. 

I haven't used it much but it has more functions than just converting to PDF, might have the set password function too.

 

wiebe@CARYA knows more about it.


The PDF Toolkit can PW protect PDF's.

 

Carya Automatisering | Products

Message 9 of 9
(1,916 Views)