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: 

Create multiple page PDF (Capture all pages on a tab)

Solved!
Go to solution

Hi,

I have a report that is displayed in tabs:

 

1) Overall Summary

2) Graphs (there are about 6 channels and data shown in graphs changes/updates as user select/change channel name using a ring control)

3) Data (All the the captured information)

 

(Data points ranges from 60- 240, I do not think is information is as important)

 

Currently, user manually selects individual page and then click on save as PDF (I am using report generation toolkit). Only drawback is that it is saving one page at a time. (Capturing entire front panel, hiding what is not needed).

 

Based on my knowledge level, I was thinking of programmatically change tabs and make selection as needed (sequentially) get all the images somehow and save them in one PDF. 

 

I could not find a way to achieve this (saving multiple pages/images). I would really appreciate if someone can nudge me in the right direction. I am open to changing approach all together.

 

Cannot attach a VI.

 

Thanks

-N

 

0 Kudos
Message 1 of 12
(2,331 Views)

Check out Exaprom PDF. If you're going straight from LV data/controls to a PDF (i.e. don't need Word or Excel reports), then it should be all you need and you can probably refactor to get rid of any code using RGT. But you can also simply use it to take PDFs and combine them, if that's your current roadblock and you just want to make what you have work.

Redhawk
Test Engineer at Moog Inc.

Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.

Message 2 of 12
(2,311 Views)

Hi FireFist-Redhawk,

 

Thank you for your response. I checked Exaprom PDF, at a glance it looks like would solve my problem. However, reading under comments I saw this:

 

"So if you ship your Exaprom application to a customer, you'll have to share your code with the world. Or buy a license. You should at least ask a lawyer (or buy a license).

Regards,

Wiebe."

 

I will read about it some more since this application will be given to multiple customers and I really doubt that my company would be spending any money 😑 and sharing code is also not an option.

 

0 Kudos
Message 3 of 12
(2,302 Views)

If you're worried about licensing, and already using the report generation toolkit...

 

One option would be to just generate a word report with all of the pages you want, then call "Print Report.vi". Under printer name feed in "Microsoft Print to PDF" and let the user save the file.

Message 4 of 12
(2,284 Views)

If you remain within the realm of using the Report Generation Toolkit, you may want to review an approach I provided on another thread (link is below).  Just note that it saves a PDF file for an entire Word report, but only the "current sheet" for an Excel report, so it may still not get you what you want from Excel.  But it doesn't require any other third party software (just what's already in Office), and it permits the code to specify the PDF file path\name.

 

Best of luck,

Dave

 

https://forums.ni.com/t5/LabVIEW/Print-PDF-report-in-exe-on-other-PC/m-p/4205601/highlight/true#M121...

David Boyd
Sr. Test Engineer
Abbott Labs
(lapsed) Certified LabVIEW Developer
Message 5 of 12
(2,253 Views)

Do you want your graphs to be images or vectors?

 

Using our (my) PDF Toolkit, I always insert data into the PDF, I never copy images from my front panel controls. Doing this results in all kinds of resolution problems.

 

For graphs, it can sometimes be beneficial to insert an image if there is (a lot of data), but usually the downsides are too big for me (not being able to zoom, printing problems, aliasing, etc.)..

0 Kudos
Message 6 of 12
(2,233 Views)

Hi BowenM,

 

Your suggestion sounds good in my head. I will try it later sometime today.

 

Thankyou

0 Kudos
Message 7 of 12
(2,226 Views)

HI David,

 

Thank you for sharing the link :). I will try this out as well. Your approach sounds similar to BowenM's.

0 Kudos
Message 8 of 12
(2,220 Views)

Hi wiebe,

 

I would need to show the images as it was deemed as a requirement. Also, sometimes the data point could go up to 2000+. I agree with on resolution issue. I currently deal with it when trying to save it as PDF but somehow managed to make work as expected.

 

I am curious to know how you transfer data to PDF. Is there a standard way of doing it in LabVIEW or you made your own program?

 

Thank you for your time.

0 Kudos
Message 9 of 12
(2,218 Views)
Solution
Accepted by topic author N_743

@N_743 wrote:

I am curious to know how you transfer data to PDF. Is there a standard way of doing it in LabVIEW or you made your own program?


We have a library, that we used to sell, but is free now, and is waiting to be open sourced (although honestly that could take years).

 

Transferring the data is a matter of inserting text, images, graphics to the PDF at the desired locations, using the correct library VI. Insert Page inserts a new page, Insert Text inserts text, etc..

This is way more work that simply printing a front panel to a PDF printer, but that usually becomes problematic anyway. There are benefits to building a document with primitive functions. Like having more control over the output. 

Message 10 of 12
(2,204 Views)