From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to quickly generate PDF file using report generation toolkit

 

lets say, that the toolkits are different 🙂

 

... long time ago: One of the topics on my wishlist was to place tables inside table cells. I didn't look deep into the toolkits and SAI had examples which using this. At this point I decided to start with the SAI toolkit. There where some other less impotant things, which I don't remember, but I think most of them are possible with both toolkits.

 

Message 11 of 20
(773 Views)

@Martin_Henz wrote:

 

lets say, that the toolkits are different 🙂


Sure.

 

What struck me most about the SimplicityAI PDF toolkit is that they use a .NET toolkit that isn't free for commercial use, while their toolkit was. They now have a paid version (for non-commercial use?), I hope that goes towards the people who created the .NET library (ITextSharp?). 

 

Also a long time ago I looked at it...

0 Kudos
Message 12 of 20
(766 Views)

How long does this operation take to create a pdf file?

0 Kudos
Message 13 of 20
(583 Views)

@Vijey123 wrote:

How long does this operation take to create a pdf file?


You need to be a lot more specific!

- Through which interface?

- How many pages?

- All text only without complex formatting or rather involved page formatting with lots and lots of pictures?

 

I used the Carya Toolkit in the past when it was still sold, to print calibration reports that contained one graph, some simple text and fairly simple frames and a few lines for fields for the operator to add handwritten notes like a signature.

 

The creation of the according PDF document containing one or two pages took less than 100 ms, way less than the typical measurement operation. Building the VI to create the page with exactly the layout the customer wanted was a different matter.

 

I spent after several iterations in various versions of that application definitely more than one or two days for that. The reason being that you use VIs to actually "draw" the PDF file. And you get exactly what you tell it to do, nothing more and nothing less. But runtime speed was definitely not the problem.

Rolf Kalbermatter
My Blog
0 Kudos
Message 14 of 20
(567 Views)

Vij@y wrote:

Hello Everyone,

 

I'm collecting a data and updating it in an excel file (.xlsx) using Report Generation Toolkit. Later I'm saving the same as PDF file using the function Save Report to File.vi to get the data in PDF format.

 

Vijy_0-1648969513728.png

 

But this above code is taking approx 8 to 10 seconds to complete the file creation. 

Our requirement is to minimize the execution time and complete more boards testing in a day.

Whether this is the efficient way to generate PDF report or is there a better way to do ?

Kindly suggest.  

 


So here is a fun hack that lets you use pure labview to generate reports without having to deal with the report generation toolkit or third party PDF report generators. Bonus, it runs real fast : ) 

 

Step 1) Make a VI that has a front panel that represents exactly what you want the report to look like. 

Step 2) Run the calibration or whatever test needs to run to populate the data on the front panel. 

Step 3) Use the front panel to jpeg method to save the front panel as a jpeg. See this: https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000YI7SCAW&l=en-US

Step 4 (optional) Batch convert the jpeg files to PDFs if you must have a PDF file for the report. 

 

Since LabVIEW has the WYSIWYG front panel with nice plots and tables I find it easier to create the actual layout of a report in LabVIEW over using MS Word and the report generation toolkit. Bonus, you don't need any libraries beyond the LabVIEW standard library.

______________________________________________________________
Have a pleasant day and be sure to learn Python for success and prosperity.
0 Kudos
Message 15 of 20
(537 Views)

@Jay14159265 wrote:

Vij@y wrote:

Hello Everyone,

 

I'm collecting a data and updating it in an excel file (.xlsx) using Report Generation Toolkit. Later I'm saving the same as PDF file using the function Save Report to File.vi to get the data in PDF format.

 

Vijy_0-1648969513728.png

 

But this above code is taking approx 8 to 10 seconds to complete the file creation. 

Our requirement is to minimize the execution time and complete more boards testing in a day.

Whether this is the efficient way to generate PDF report or is there a better way to do ?

Kindly suggest.  

 


So here is a fun hack that lets you use pure labview to generate reports without having to deal with the report generation toolkit or third party PDF report generators. Bonus, it runs real fast : ) 

 

Step 1) Make a VI that has a front panel that represents exactly what you want the report to look like. 

Step 2) Run the calibration or whatever test needs to run to populate the data on the front panel. 

Step 3) Use the front panel to jpeg method to save the front panel as a jpeg. See this: https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000YI7SCAW&l=en-US

Step 4 (optional) Batch convert the jpeg files to PDFs if you must have a PDF file for the report. 

 

Since LabVIEW has the WYSIWYG front panel with nice plots and tables I find it easier to create the actual layout of a report in LabVIEW over using MS Word and the report generation toolkit. Bonus, you don't need any libraries beyond the LabVIEW standard library.


That will result in (PDF) files with raster graphics (e.g. pixels, not vectors).

 

- Text won't be selectable.

- All objects will become one big image. 

- The documents won't scale (dithering if shown small, interpolation if large).

- You won't be able to add links, table of content, etc.

 

Potentially, the documents could be much larger than needed (although sometimes images are smaller than their data as vectors)

Message 16 of 20
(510 Views)

wiebe@CARYA wrote:


...

 

That will result in (PDF) files with raster graphics (e.g. pixels, not vectors).

 

- Text won't be selectable.

- All objects will become one big image. 

- The documents won't scale (dithering if shown small, interpolation if large).

- You won't be able to add links, table of content, etc.

 

Potentially, the documents could be much larger than needed (although sometimes images are smaller than their data as vectors)


Yes, you are of course correct. If it accommodated every design criteria it would not be a hack ; )  

 

______________________________________________________________
Have a pleasant day and be sure to learn Python for success and prosperity.
Message 17 of 20
(492 Views)

@Jay14159265 wrote:

wiebe@CARYA wrote:


...

 

That will result in (PDF) files with raster graphics (e.g. pixels, not vectors).

 

- Text won't be selectable.

- All objects will become one big image. 

- The documents won't scale (dithering if shown small, interpolation if large).

- You won't be able to add links, table of content, etc.

 

Potentially, the documents could be much larger than needed (although sometimes images are smaller than their data as vectors)


Yes, you are of course correct. If it accommodated every design criteria it would not be a hack ; )  


Quick hacks that work are great.

Message 18 of 20
(483 Views)

wiebe@CARYA wrote:


Quick hacks that work are great.


So I figured out that hack working for a sensor manufacture that wanted to include a printout calibration for each sensor in the retail box. Production floor and cal lab were all Linux boxes so no Word or Windows tools. I'm sure that if you buy a sensor of a certain brand today you will get a cal certificate that is made in this way. : ) 

______________________________________________________________
Have a pleasant day and be sure to learn Python for success and prosperity.
0 Kudos
Message 19 of 20
(481 Views)

Hi Rolf,

Thanks for your input. I downloaded the Exaprom PDF library and completed the task. My task was to convert the test data in excel sheet(contains almost 200 columns and 400 rows) into a pdf.
I changed the size of the page to A0 and used the VIs in Exaprom to generate the report. Working properly for now. Will get back for any further advancements.

 

0 Kudos
Message 20 of 20
(406 Views)