Gepponline Posted June 17, 2021 Report Share Posted June 17, 2021 Hi, I'd like to print a PDF File. No need to manipulate it, only print. I found some suggestion about using command line via System Exec VI like this: "<Path to AcroRd32.exe>" /t "<Path to document>" "Printer name" But it doesn't seems to work. It opens acrobat reader but it doesn't print. Any solution can be accepted, even using firefox or chrome or whatever else. thank you! Quote Link to comment
Bryan Posted June 17, 2021 Report Share Posted June 17, 2021 I'm sure others have better suggestions (e.g. a LabVIEW Toolkit or other), but in the past I worked with a system that used PDF995 virtual printer and have LabVIEW set it as the default printer and then print to it. However, It will prompt you for a filename/save location every time you print to it and I wasn't able to figure out how to change the default filename at the time nor have it print without prompting. Quote Link to comment
thols Posted June 17, 2021 Report Share Posted June 17, 2021 crossposted: https://forums.ni.com/t5/LabVIEW/Print-a-PDF-File/m-p/4158140#M1200089 Quote Link to comment
Gepponline Posted June 17, 2021 Author Report Share Posted June 17, 2021 Yes, I've posted my question to both forums 'cause I expect different users use different forums so better possibility to have suggestions. Quote Link to comment
hooovahh Posted June 17, 2021 Report Share Posted June 17, 2021 37 minutes ago, Gepponline said: Yes, I've posted my question to both forums 'cause I expect different users use different forums so better possibility to have suggestions. That's fine, it just helpful for others to know that a duplicate conversation is taking place elsewhere, so that we know not to suggest things already tried, or to suggest things that have been tried or won't work for some reason. Oh and in the past I have used this toolkit but have had issues with Windows picking the right printer in the past. Quote Link to comment
bbean Posted June 17, 2021 Report Share Posted June 17, 2021 (edited) If you are using Win10 you can try the VI(s) in the attached LLB. We typically create a "print" VI that shows all the controls, decorations logos etc we want to print, then run the VI in this llb. I threw the llb together real quick...hope everything works. Win10PrintPDF.llb Edited June 17, 2021 by bbean Quote Link to comment
Gepponline Posted June 17, 2021 Author Report Share Posted June 17, 2021 (edited) I use 2017 so i can't open VI in 2018. But as i can imagine from the VI name, you are printing TO PDF, I need to print A PDF instead, send a PDF file to a printer. Edited June 17, 2021 by Gepponline Quote Link to comment
bbean Posted June 17, 2021 Report Share Posted June 17, 2021 Ok. I misunderstood. But maybe there's something in there that can help. I remember having to do a lot of work arounds with callback VIs to get printing a panel without a prompt for filename to work. Attached is a 2014 version. Win10PrintPDF2014.llb Quote Link to comment
GolzioAC Posted June 17, 2021 Report Share Posted June 17, 2021 Hi, If you need only to print PDF without any further action another option should be use Report Generation Toolkit, at the same way you can save a word document you can also save the file as PDF. If you can use this toolkit I can find an example. All the Best Golzio Quote Link to comment
ShaunR Posted June 17, 2021 Report Share Posted June 17, 2021 1 hour ago, bbean said: Ok. I misunderstood. But maybe there's something in there that can help. I remember having to do a lot of work arounds with callback VIs to get printing a panel without a prompt for filename to work. Attached is a 2014 version. Win10PrintPDF2014.llb 175.62 kB · 0 downloads To use the PrintDocument .NET interface you need a 3rd party .NET assembly to render it (like Acrobat). Otherwise you'll just get a blank document. Quote Link to comment
Gepponline Posted June 18, 2021 Author Report Share Posted June 18, 2021 14 hours ago, GolzioAC said: If you need only to print PDF without any further action another option should be use Report Generation Toolkit, at the same way you can save a word document you can also save the file as PDF. As I already told to others, I don't nett to print TO PDF but print A PDF, so an already existing PDF document has to be printed on paper (label in my specific case). Quote Link to comment
ShaunR Posted June 18, 2021 Report Share Posted June 18, 2021 (edited) This is a 3rd party (and free) solution I've used the past, successfully. Download Sumatra PDF from the website and install. You can use it to print from the command line. . Sumatra Print.vi Edited June 21, 2021 by ShaunR Quote missing in Sumatra Print.vi 1 Quote Link to comment
Gepponline Posted June 21, 2021 Author Report Share Posted June 21, 2021 OK, summing UP, I found three different solution: 1) Using AcroPDF Activex Object 2) Using Ghostscript 3) Using Sumatra PDF And that's all. Thank you 1 Quote Link to comment
ShaunR Posted June 21, 2021 Report Share Posted June 21, 2021 5 hours ago, Gepponline said: And that's all. Well. There's also the Windows PDF which you can send to a printer, if you're feeling brave, but the ones you have detailed are by far the easiest. Quote Link to comment
Jordan Kuehn Posted June 21, 2021 Report Share Posted June 21, 2021 On 6/18/2021 at 7:42 AM, ShaunR said: This is a 3rd party (and free) solution I've used the past, successfully. Download Sumatra PDF from the website and install. You can use it to print from the command line. .Sumatra Print.vi Second this option. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.