06-07-2023 06:34 AM
I used a program to generate a picture. I want to print it directly with a printer instead of inserting word or ecxcel. What should I do?
06-07-2023 08:04 AM
Go to windows explorer, right click on the file and select "Print".
06-07-2023 08:05 AM
If you attached your LabVIEW code, we'd be able to tell what you did to generate the picture. We'd then (probably) be able to advise you how to export your "picture" (or "image") to as suitable format (like .bmp, .png, .jpeg, etc.) that could be sent to a printer by asking Windows to send the file to the Printer of your choice.
If you are using LabVIEW 2023, please "Save for Previous Version" and specify LabVIEW 2021 or 2019 to get more of the "old-timers" to venture an opinion.
Bob Schor
06-07-2023 08:15 AM
Place your picture on the front panel, then invoke node Print.Panel To Printer:
https://www.ni.com/docs/en-US/bundle/labview/page/lvprop/vi_prnt_pnl_to_prnter.html
This is probably one of the easiest ways.
06-07-2023 08:38 AM
You can use a function called Read JPEG file then use draw functions to show on the picture indicator, then use the property node described before to print front panel after execution.
Go to VI Properties -> Print
Select the last item.
06-07-2023 09:13 AM
@田淇予 wrote:
I used a program to generate a picture. I want to print it directly with a printer instead of inserting word or ecxcel. What should I do?
This is a very generic questions and, (unless you posted in the wrong place!!!), maybe you are actually talking about a LabVIEW program where the picture is displayed on the LabVIEW front panel and you want to use LabVIEW to print this directly.
Assuming this is a LabVIEW question, we can give more specific help once you show us what you have. There are plenty of ways!
06-07-2023 09:23 AM
Use "System Exec.vi":
mspaint.exe -p imagePath
06-07-2023 09:39 AM
Thank you for your reply, butI want to trigger the printer by clicking a button when the software generates pictures.
06-07-2023 09:41 AM
please properly describe what you are trying to accomplish.
06-07-2023 09:42 AM
Again, show us what you have? Do you have a suitable defined default printer?