LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Print a PDF File

Solved!
Go to solution
Solution
Accepted by gepponline

@James_W wrote:

I'm going to second Ghostcript - it seems I did look at it years ago but never made it work for me (I think it cost money that was not available for my company then).


I have it somewhere...

 

As the author of the PDF Toolkit, I had this question a lot. Best choice ever was to not include printing in the toolkit. This is a mess...

 

As this isn't source code, and also because I'm not that organized, the "ghostscript VI" probably lives on a HDD in an old laptop. It didn't make it to SCC.

 


@James_W wrote:

My 2012 implementation that I eventually got working was ActiveX through a WebBrowser. (I think using AdobeX).
but a lot has changed in activeX support since then so there not even any point in digging out that code.


Good point. This one is pretty recent:

Acrobat Print Without Dialog.png

 

EDIT: Also attached it in LV13...

Message 11 of 22
(2,569 Views)
Don't think about print to paper.
I'm talking about INDUSTRIAL AUTOMATION, And I'm gonna printing to an automatic labeler. It's the third time I have this need. The first two allowed me to print starting from a front panel VI, in this case the label will arive from an ERP, so I will receive PDF.
0 Kudos
Message 12 of 22
(2,566 Views)

In some industries (defence and medical) the piece of paper can still be more important than the electronic record as it actually goes around with the unit and contains a record of any changes to it that can't be easily added / switched on an electronic system. It's difficult to get out of that space with more complex devices that take longer to test and sign off - so it's possible.

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
0 Kudos
Message 13 of 22
(2,566 Views)

PRINT WITH GHOSTSCRIPT.png

Here is the same result, direct print, with Ghostscript 😉

Message 14 of 22
(2,545 Views)

Download BullZip PDF printer - then use this LabVIEW VI to configure it - this VI lets you define the file name and destination path of the PDF.

 

NOTE: To suppress Dialogs - Use the 'Bullzip PDF Printer Options' application [installed with the driver] to turn off all dialogs.

 

NOTE 2: On some Windows enterprise installs the dialog suppression is very odd- again use the Bullzip App to turn those off on that particular install.

 

Regards Jack Hamilton

 

0 Kudos
Message 15 of 22
(2,289 Views)

@MrJackHamilton wrote:

Download BullZip PDF printer - then use this LabVIEW VI to configure it - this VI lets you define the file name and destination path of the PDF.

 

NOTE: To suppress Dialogs - Use the 'Bullzip PDF Printer Options' application [installed with the driver] to turn off all dialogs.

 

NOTE 2: On some Windows enterprise installs the dialog suppression is very odd- again use the Bullzip App to turn those off on that particular install.


That prints to a PDF, it doesn't print a PDF.

0 Kudos
Message 16 of 22
(2,277 Views)

Hi,

 

Where i can get printer server info??

0 Kudos
Message 17 of 22
(1,805 Views)

@Risuraj wrote:

Hi,

 

Where i can get printer server info??


This might work:

Printers.png

 

If not, .NET or the command line would be where I'd go looking.

0 Kudos
Message 18 of 22
(1,778 Views)

I'm a little late to this party, but the method I've been using for years now on Windows, is to use SumatraPDF. It has very convenient command-line options for printing and doesn't open the PDF viewer window when printing if you don't want it to. It's fairly small and unobtrusive. And it's freeware! We build an installer with InnoSetup and include the SumatraPDF installer as part of the installation script. But you could also have it as a separate prerequisite.

 

https://www.sumatrapdfreader.org/free-pdf-reader

 

My command line string looks a bit like this:

 

"C:\Users\owner\AppData\Local\SumatraPDF\SumatraPDF.exe" -print-to-default -silent -exit-on-print "C:\Users\owner\Documents\testfile.pdf"

 

You can also specify the printer to use (from the App.Pr.Printers list as shown in wiebe's comment above) using the -print-to "printername" switch.

Message 19 of 22
(1,100 Views)

I remember we had that issue at my previous job, printing via System exec was problematic so i ended up doing some ActiveX stuff with Acrobat. 

Now i'd load it into Edge and print that way. No extra programs needed and the built in PDF reader is really good, actually. 

(There were several PDFs in a print-and-play i had that failed to print from Acrobat, but was successful from Edge)

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

Qestit Systems
Certified-LabVIEW-Developer
Message 20 of 22
(1,084 Views)