LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Printing whole front panel to pdf (vector graphics) programmatically

Hello, I'm new to LabView. I need to print whole front panel to pdf. Here comes the problem I can't print it programmatically because it doesn't allow me to assign path and name to it. 

What do I need?

 

1) make calculations       --- works fine in my script 

2) plot graphs                  --- works fine in my script 

3) print to pdf                   --- I haven't found way to solve it

4) change data file           --- works fine in my script 

5) back 1)                        --- works fine in my script 

 

It is all one big loop. There will be multiple pdfs when loop will be ended. That's why I can't print at the end of vi.

 

Print to pdf function has to accept path and file name and than print it to specified directory with specified file name.

 

Now I'm using solution that looks like this and it shows window where i can input path and name but it works terribly. 

IlyaChaban_0-1646926493480.png

 

0 Kudos
Message 1 of 9
(1,111 Views)

Have you tried using the existing method?

File>>Print VI pops up a very nice print configuration wizard.

 

Vector Graphics do not exist in LabVIEW. 


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 9
(1,100 Views)

This is not programmatically. There is no problem to do it once manually, but i have like 20 files only for one measurement set. There will be more and more next time. That's why I don't accept manual way.

0 Kudos
Message 3 of 9
(1,095 Views)

Good thing that there is a METHOD called Print VI.

 

This is PART of LabVIEW Datalogging capabilities which can also be set with the VI Propery "Log at Completion"

 

Your previous snip would probably be just fine if you gave the Open File Reference a filename


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 9
(1,081 Views)

The front panel is pixel based, and is basically an image. PDF is for documents and I don't see any valid reason to create all these pdf files, containing a single image each.

 

Much more reasonable would be to get the front panel image and save it to an image file (e.g. PNG). Right?

 

altenbach_0-1646927031636.png

 

 

Also have a look at the report generation tools. Maybe you could create an html report containing all pictures, for example.

 

0 Kudos
Message 5 of 9
(1,078 Views)

Ok, agree about front panel pixel based(cause I don't actually know how it works for now). But i need it to be pdf. Two There are multiple graphs at one front panel with multiple other comments that has to be visible at pdf. NO there is no reason for me to save it in PNG.

 

Here is an example how it has to look like in pdf. I've made it manually and now i need it to be done programmatically. (Upload big data set and create multiple reports with one touch of a button)

IlyaChaban_0-1646927239456.png

 

 

If I create it in png format that wouldn't ever look like this (zoomed a lot) that's why I need it to be vector graphics. and yes there are some pixelated elements 

IlyaChaban_1-1646927310769.png

 

I will try report generation tools.

 

But if you can help me with that exact task that I've defined without your changes I will be more happy. Thank you.

 

 

0 Kudos
Message 6 of 9
(1,066 Views)

I am sure that a pdf of the front panel is NOT vector based, but just incorporates the same bitmap as the image. Did you ever zoom in?

 

You can get an image of any individual graph or the entire front panel (all, or only visible area).

 

It seems silly to create all these loose files ("herding cats" comes to mind 😄 ) if you could just create a single HTML report containing everything.

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

Actually the front panel is GDI based which is a Windows internal vector style API. However there is no easy way to get at that.

 

One thing that seemed to work in old days was to "print screen" a front panel to the clipboard. Windows will store the pixel bitmap of the front panel, but also a WMF/EMF format to the clipboard. The WMF/EMF format is pretty much simply a recording of all the vector GDI commands in a Windows specific format. Pasting this into a Word file would extract this WMF/EMF format in the past and that allowed nicely scaleable front panel images.

 

But there are not many programs nowadays that still know what WMF/EMF is and accordingly you can not use it much. PDF almost certainly doesn't support it as the conversion from GDI commands to PDF postscript description language would be highly non-trivial. 

Rolf Kalbermatter
My Blog
0 Kudos
Message 8 of 9
(1,022 Views)

Screenshot that i've sanded to you was pdf and it was zoomed no doubt. Here it is in attachments.

0 Kudos
Message 9 of 9
(984 Views)