LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PDF to Image FIle

Solved!
Go to solution

 

Hi,

 

  I would like to ask if it is possible to use LabVIEW to convert PDF files to image files? or more specifically, PNG files.

 

  Or is there any resources/links that provides sufficient information about the PDF format so that one can use LabVIEW to do some manupulation and get an image/picture Map?

 

  Will appreciate any advises.

 

  Thank you for your kind attention.

 

 

Rgds

0 Kudos
Message 1 of 16
(6,428 Views)

I would consider using ImageMagick to perform the conversion and some of the manipulations.  

 

You can find a nice LV interface here

0 Kudos
Message 2 of 16
(6,415 Views)
Another option: There are numerous converter programs out there, and many of them have a command-line interface, so you could simply get one of these and call it using System Exec.
0 Kudos
Message 3 of 16
(6,412 Views)
Solution
Accepted by topic author Limsg

I once posted a VI to create PNG files from LaTeX commands where I used Ghostscript to convert from eps to png.  It turns out, with only a very minor modification the subVI will also convert PDF to PNG.  Try this out.  You can install Ghostcript and then add the path to gswin32c.exe to the path control (if you install to the default location you shouldn't have to change anything other than drive letter).

 

 http://pages.cs.wisc.edu/~ghost/

 

 

Message 4 of 16
(6,403 Views)

 

Hi, thanks for the replies.

 

I have came across a few programs that can do the conversion, but those that are free doesn't support command line execution so cannot automate.

 

I have also came across some SDKs but so far none are free.

 

That's why I'm considering creating a custom program to do the job.

 

Will check out the imagemagic.

 

 

0 Kudos
Message 5 of 16
(6,402 Views)

Limsg wrote:

 

Hi, thanks for the replies.

 

I have came across a few programs that can do the conversion, but those that are free doesn't support command line execution so cannot automate.

 

 

Will check out the imagemagic.

 

 


 Ghostscript is free and command line ready (see my previous example).  Simple installation, good conversion tools.  ImageMagick has command line interface, and very powerful manipulation tools.  Installing the LV interface involves some OpenG libraries and some learning, but it is very nice when you get it going.  It basically builds the commands for you. 

 

Message 6 of 16
(6,398 Views)

 

Hi Darin, is it possible to save the VI as LV7.1? I can't open the attached VI.. thanks..

0 Kudos
Message 7 of 16
(6,391 Views)

Sorry I don't have LV8.0 installed so I can't save for 7.1, perhaps someone else would be kind enough, or we can try the downconvert request thread.  

 

There was not much I liked about 8.0 and when I removed it I didn't know or care that I wouldn't be backsaving.... 

0 Kudos
Message 8 of 16
(6,368 Views)
Saved as 7.1. The Match Regular Expression function did not exist in 7.1 so I replaced it with a Match Patter that searches for the period. Obviously this will fail if the filename has more than one period in it, but I'll leave it to the OP to change the code if desired.
Message 9 of 16
(6,342 Views)

 

smercurio, thank you..

 

 

Darin, actually my company has bought LV8 also, but after using for a while, I removed it and prefer to use LV7.1 instead. It's simpler and easy to use. The biggest reason is it seems very complicated to complie an installation package with the LV8 application builder, when it's a breeze to use the AB in LV7.

 

I'll experiment with gs as recommended. Thank you for the kind help..

 

0 Kudos
Message 10 of 16
(6,329 Views)