LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

automaticly print to pdf without file name prompt

Hi,
I am building an aplication that uses "Report Generation Toolkit". I am creating a "word" report with a template. After I am done with word creation I want to convert this "word" report to "PDF" format. I need that this process will be an automatic one. I understand that I can use print to PDF software, but the problem with it is that every such software prompts me to choose file name and destination.I need to avoid this.
Please help me.

Regards,
Jenia.
0 Kudos
Message 1 of 11
(16,253 Views)
Hi Jenia,
you could use a little program called pushkeys.exe, I attached it, it's freeware.
Greets, Dave
Greets, Dave
0 Kudos
Message 2 of 11
(16,237 Views)
Hi,
I am not clearly understand what this program will do? Will it emulate the keyboard pressing? If yes can you please explain a little bit more about how to use it?

Thank you wery much for your help.
Regards,
Jenia.
0 Kudos
Message 3 of 11
(16,230 Views)
Hi Jenia,
yes, it simulates keystrokes. You can call the program "pushkey.exe" in the following manner:

pushkeys "PDF-File save as" "%nReport~"

This sends to a Window with the name "PDF-File save as" an Alt+n to set the key focus to the name-field, then "Report", then Enter to confirm.
In the Zip- File is a very useful Help- File which explains everything.
Greets, dave
Greets, Dave
0 Kudos
Message 4 of 11
(16,192 Views)

Jenia wrote:
... I understand that I can use print to PDF software, but the problem with it is that every such software prompts me to choose file name and destination.I need to avoid this.
Jenia,
There is a lot of PDF software available and some do provide the means to avoid prompts when saving the PDF.   PDFCreator has the advantage of being open source and free, has its Autosave option and had a COM interface added to recent versions. Alternatively you could look at pdf995 which has similar capabilities.  I'm sure there are others.
=====================================================
Fading out. " ... J. Arthur Rank on gong."
0 Kudos
Message 5 of 11
(16,160 Views)
Hi,
I've just tryed thos PDFCreator and I think that it posses everything that I need.
Thank you very much.

Regards,
Jenia.
0 Kudos
Message 6 of 11
(16,141 Views)

hi there, i am trying to do the same thing, but i been going through the forum andeveryone suggested the same thing. the only thing i am not happy with is that if you use pdfcreator to autosave the pdf file.

its saves all files as 1 and give it a genenic name. 

i can define the name like 

SN_353634.pdf or something?

Best regards,
Krispiekream
0 Kudos
Message 7 of 11
(15,141 Views)

Hi,

There are different option for defining filenames when printing to PDF, depending on what control you have on the PC.  

 

If you can write to the registry you can fully automate the filename & path of the PDF file using some commercial writers (Acrobat, Win2PDF) and some free / shareware creators (qvPDF at SourceForge).  Some can also use printer API interface, but I haven't done that.

 

PDF995 uses a configuration file in its exe folder to keep filename & path details, if poking the registry is a bit severe. 

 

Regards,

Ian

0 Kudos
Message 8 of 11
(14,059 Views)

Great tips, thank you.

0 Kudos
Message 9 of 11
(12,296 Views)

So after spending way too much time figuring this out I thought I would post it for future help for others:

 

If using the Report Generation Toolkit with a Word template and wanting to print to PDF and specify the filename yourself...You can use the Word ActiveX Reference to ExportAsFixedFormat rather than print to PDF as I was initially trying to do (which doesn't allow you to choose a name). Your version of Word must have the export option (I have 2007 and it was there).

 

export.png

Message 10 of 11
(10,157 Views)