LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Print VI Front Panel as landscape and fit to page in LV 2018.

In LV 2018, the report generation in LabVIEW no longer supports the "standard" type, which means there is no simple way to have a VI FP be printed as Landscape and fit to page. Well, there are ways, but all have issues. Please, what way have I missed?

 

1. Use Word? No, I don't want to require Word to be installed.
2. Use HTML? No, Cannot set to landscape
3. Use the "Print.Panel To Printer" invoke node? No, produces incorrect graphics, e.g. if I have changed the graphics for tick marks in a graph, the tick marks will be printed as black boxes.
4. Create an image of the FP and rotate it? No, still have to resize it to fit the page. And then I will have to get the page size and calculate a new image to fit it. Not simple. Or do you have a simple way?
5. Create an image and use an external or Windows built-in function to print? Well, I haven't found anything that won't require a couple of hours of coding .NET.
6. Use something from VIPM? Well, I found some pdf-generator, but I couldn't get it to fit to landscape and it was not free for commercial use.

 

Shouldn't it be simple and built-in in LabVIEW to just print the FP or a control or image and have it fit to the page in landscape? It used to be.

Certified LabVIEW Architect
0 Kudos
Message 1 of 6
(3,380 Views)

I vote for #5. It shouldn't be many nodes to print through e.g. IE with Landscape and Fit to page.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 6
(3,364 Views)

@Yamaeda wrote:

I vote for #5. It shouldn't be many nodes to print through e.g. IE with Landscape and Fit to page.

/Y


Well, I might try that, but can one be certain that IE always exist on a Windows PC? It could have been uninstalled. Something native to LabVIEW (or a LabVIEW-plugin) would be the best, or native to Windows.

Certified LabVIEW Architect
0 Kudos
Message 3 of 6
(3,360 Views)

For reference, I found a solution that will cover my requirements, to print a front panel in landscape and fit to page. As this post suggest, mspaint can be used. The amazing thing is that it will print with fit to page and landscape (only). There are no other settings other than to specify printer, but it is enough for me.

 

print using mspaintprint using mspaint

Certified LabVIEW Architect
Message 4 of 6
(3,328 Views)

Nice! Though the same issue can be raised, are you sure people have mspaint? 😉 You don't need the "cmd /c" in the commandline?

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 5 of 6
(3,322 Views)

MS Paint has been installed with Windows since Windows 1.0. MS Paint has had this feature since Windows 2000. It recently was added to the list of deprecated features, so it might be removed in the future though. But its the best I could find, that is available on practically all PCs. I will also add the possibility to save to an image of the FP to file so the user can print using whatever program they wish. In fact, I guess that should be the desired/default function. Who prints stuff these days anyway?

 

I'm still interested if anyone has another solution, e.g. other built-in Windows-features that works for win7+. I tried using shimgvw.dll, but that would not rotate and resize the image. (for reference: cmd /c rundll32.exe \%SystemRoot\%\\System32\\shimgvw.dll,ImageView_PrintTo /pt "file name goes here" "printer name goes here").

 

No, I didn't need the cmd /c, but it is needed for shimgvw.dll.

Certified LabVIEW Architect
Message 6 of 6
(3,317 Views)