LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

autosave in pdf and autoprint

Solved!
Go to solution

I am running a test on multiple devices,

I have created a program and it print the frontpage of labview automaticlly using a PDF printer. CutePDF

I have a copy of the report i made in EXCEL or .csv form.

It doesnt look like the same pdf page i print outs, the layout that is.

is there a way for me to print automatically, yet also save it in pdf form? (so that if in the future, i misplaced the printed paper, i can always reprint it)

also, for instant, i want to save the file in 

 

SN_343432.PDF

SN_234343.PDF

 

or whatever name I desired rather than letting PDFCreator give me a predefined filename?

the reason because if we create a database, its easier to sort by SN_XXXXXXX.pdf rather than a predefined filename by PDFCreator?

if someone have a solution to this, please let me know

thanks in advance

Best regards,
Krispiekream
0 Kudos
Message 1 of 12
(11,585 Views)

Hi krispie,

 

You can print to a PDF much like you print to a printer.   However, I am unfamiliar with the VIs and addons that you are using to print to a PDF, so I am unsure if you have the option to change the filename in those VIs.  Is this PDF printer VI something you created or downloaded?  Either way, could you provide a link to it?

Stephen Meserve
National Instruments
0 Kudos
Message 2 of 12
(11,578 Views)

i just downloaded pdfcreator online..

and instead of printing frontpage to printer.

i set my printer as pdf printer and it either ask me to save file name as whatever, or i can set autosave and pdf printer will give me a predefined name.

either option doesn't allow LABVIEW to write the file name.

 

Best regards,
Krispiekream
0 Kudos
Message 3 of 12
(11,563 Views)
http://downloads.sourceforge.net/pdfcreator/PDFCreator-0_9_7_setup.exe?modtime=1234134640&big_mirror=0
Best regards,
Krispiekream
0 Kudos
Message 4 of 12
(11,557 Views)
Solution
Accepted by topic author krispiekream

Hi krispie,

 

It seems as though this is more an issue with the PDF Creator software than with LabVIEW.  I can think of one possible solution.  You could monitor the directory where the PDFs are saved and then use LabVIEW to change the names as they are created by the PDF Creator software.  Otherwise, you would have to request a VI interface for the PDF Creator software.  Please let me know if I've misunderstood.  Thanks!

Stephen Meserve
National Instruments
Message 5 of 12
(11,550 Views)

"You could monitor the directory where the PDFs are saved and then use LabVIEW to change the names as they are created by the PDF Creator software."

 

that will work. do you have any examples so that i can see?

also, no..i dont need to use pdf creator if labview has a way of creating a pdf file of the frontpanel. let me know if you have any other solution..

 

Best regards,
Krispiekream
0 Kudos
Message 6 of 12
(11,538 Views)

"krispiekream" <x@no.email> wrote in message
news:1234489206756-852459@exchange.ni.com...
> &quot;You could monitor the directory where the PDFs
> are saved and then use LabVIEW to change the names as they are created
> by the PDF Creator software.&quot;&nbsp;that will work. do you have any
examples so that i can see?also, no..i dont need to use pdf creator if
labview has a way of creating a pdf file of the frontpanel. let me know if
you have any other solution..&nbsp;

Kirspiekream,

There are various command line tools that will convert a jpg to pdf. I'm not
sure if there is a free one, most of them seem to add a evaluation notice.
If such a command line tool works, you might consider buying it, most of
them cost 20-40$... You can also do this with our toolkit (google "carya pdf
toolkit") , and get a similar evaluation notice. It's costs bit more, but
can do a lot more as well.

Regards,

Wiebe.


0 Kudos
Message 7 of 12
(11,523 Views)

krispiekream wrote:

"You could monitor the directory where the PDFs are saved and then use LabVIEW to change the names as they are created by the PDF Creator software."

 

that will work. do you have any examples so that i can see?

also, no..i dont need to use pdf creator if labview has a way of creating a pdf file of the frontpanel. let me know if you have any other solution..

 


 

As you have found out there are various solutions to printing to PDF file. When I looked at this a few years ago what I found is that there are free solutions and some that cost money. The free ones never allow to control the filename to which they write if they even allow to bypass the file dialog. The non free ones have various programming API solutions (DLL, registry setting, ActiveX) depending on the software you choose that allow you to control if a dialog should be presented and if you decide to skip the dialog to also set the file name and location where the PDF file should be written.

 

I have used the Amyuni PDF SDK with there PDF Printer driver in the past for a customer application since they required unlimited distribution of the built application. It was a bit a hassle to get the licensing work right but eventuelly worked.

 

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 8 of 12
(11,503 Views)

"You could monitor the directory where the PDFs are saved and then use LabVIEW to change the names as they are created by the PDF Creator software"

 

I have used the method that you suggested and it works for my program..

thank you!!

 

I monitored the directory using the LIST function..

I use the MOVE function to rename the files in a FOR LOOP. and that seems to did the job...

 

if anyone needs the code..i can provide it as an example for beginner like myself.

 

thank you everyone else for helping me on this. i really appreciated. 

Best regards,
Krispiekream
0 Kudos
Message 9 of 12
(11,414 Views)

Hey krispie ,

 

It would kind to message me the code of converting the front panel into pdf.As in my case, i am plotting the time w.r.t Temp & Rel.Humiidity. After the plot. i would like to convert the same into pdf automatically.

 

It would be really helpful to go through with your VI and have some idea . i am also beginnner.

 

Regards,

Susheel

0 Kudos
Message 10 of 12
(9,547 Views)