Problem on saving chart as a pdf by programming.
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
Problem on saving chart as a pdf by programming.
Hi all,
I understand that eviews might not let users save a chart in a PDF format as an option of graph.save. However, I installed a software to enable my
computer to do so.
My problem is: how can I do it by programming. Right now, whenever I want to save a chart, I have to open a chart, click" Print" , and select printer (which is the software I use to save as PDF file). Can I use commands to do all these? This is because I have roughly a hundred charts created by a program. To save them by clicking is really painful. It would save much time if I could do them by commands.
Thanks in advance.
I understand that eviews might not let users save a chart in a PDF format as an option of graph.save. However, I installed a software to enable my
computer to do so.
My problem is: how can I do it by programming. Right now, whenever I want to save a chart, I have to open a chart, click" Print" , and select printer (which is the software I use to save as PDF file). Can I use commands to do all these? This is because I have roughly a hundred charts created by a program. To save them by clicking is really painful. It would save much time if I could do them by commands.
Thanks in advance.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Problem on saving chart as a pdf by programming.
Since EViews doesn't offer printing to a PDF document, there is no way to print to a PDF document via the command line / in a program.
Re: Problem on saving chart as a pdf by programming.
Hi Gareth,
I understand what you mean, but what I mean is: is there a way I can convert the manual work into command:
theoratically, all the actions (such as clicking, manual inputting etc.) have commands behind the shell.
If I can do something via clicking, I should be able to also do it via commanding. Just my quick thought though.
The key of the problem is: how to assign a printer as eviews' printing device by command.
I tried the print command options, but didn't find what argument I should change to set my external
software (which I used to save a chart as PDF) as default printer. If I can do the printer setting by command, I think
the problem is solved.
I understand what you mean, but what I mean is: is there a way I can convert the manual work into command:
theoratically, all the actions (such as clicking, manual inputting etc.) have commands behind the shell.
If I can do something via clicking, I should be able to also do it via commanding. Just my quick thought though.
The key of the problem is: how to assign a printer as eviews' printing device by command.
I tried the print command options, but didn't find what argument I should change to set my external
software (which I used to save a chart as PDF) as default printer. If I can do the printer setting by command, I think
the problem is solved.
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3798
- Joined: Wed Sep 17, 2008 2:25 pm
Re: Problem on saving chart as a pdf by programming.
Two things:
Gareth: Would it be possible to use Print Setup and set the printer to a pdf driver? At least only one manual intervention would be required?
Liu: Perhaps surprisingly, EViews isn't a shell on top of commands. A lot of the GUI is hardwired to the code, with the commands being the add-on.
Gareth: Would it be possible to use Print Setup and set the printer to a pdf driver? At least only one manual intervention would be required?
Liu: Perhaps surprisingly, EViews isn't a shell on top of commands. A lot of the GUI is hardwired to the code, with the commands being the add-on.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Problem on saving chart as a pdf by programming.
I think the issue you're both missing is that EViews isn't offering the GUI that does the PDF printing. That is offered by whatever software you downloaded that offers PDF printing.
Liu when you say that:
All you can do in EViews is select a printer. Anything that happens after EViews has sent a document to print is not controllable by EViews.
Liu when you say that:
This is only true for things that EViews does. EViews does not do PDF printing, therefore there is no command to do it.If I can do something via clicking, I should be able to also do it via commanding. Just my quick thought though.
All you can do in EViews is select a printer. Anything that happens after EViews has sent a document to print is not controllable by EViews.
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3798
- Joined: Wed Sep 17, 2008 2:25 pm
Re: Problem on saving chart as a pdf by programming.
Uh, if the default print driver happens to be a pdf driver (nothing to do with EViews) won't printing send out pdfs? Or is the problem that the pdf print driver needs interaction that can't be automated inside EViews?
Alternatively, send files to a spool and then print the spool to pdf manually???
Alternatively, send files to a spool and then print the spool to pdf manually???
-
EViews Glenn
- EViews Developer
- Posts: 2682
- Joined: Wed Oct 15, 2008 9:17 am
Re: Problem on saving chart as a pdf by programming.
In principle, yes to the first question, but as you have speculated, the problem is that most drivers that print to a file prompt you for the output file name.
Re: Problem on saving chart as a pdf by programming.
I think the issue you're both missing is that EViews isn't offering the GUI that does the PDF printing. That is offered by whatever software you downloaded that offers PDF printing.
Liu when you say that:This is only true for things that EViews does. EViews does not do PDF printing, therefore there is no command to do it.If I can do something via clicking, I should be able to also do it via commanding. Just my quick thought though.
All you can do in EViews is select a printer. Anything that happens after EViews has sent a document to print is not controllable by EViews.
Hi Gareth,
That's exactly what I want. It would be great if I could use commands to select a printer, which will bypass the limitation that eviews can't save pdf.
I guess it might be a command like: print (printer=PDFwriter) chart1 . This way I don't have to open each chart and click print then click printer everytime.
Hi Startz and Glenn:
you are right that the external software does require a file name when I intend to "print" to the PDF printer. However, that is not a big problem since the chartname is the default file name (or at least I can solve that problem later.)
It would be great if I can assign a printer as default printer by defaut. Right now the default printing device for eviews is the last device used for printing.
-
EViews Glenn
- EViews Developer
- Posts: 2682
- Joined: Wed Oct 15, 2008 9:17 am
Re: Problem on saving chart as a pdf by programming.
Should be the default printer for your system. If you change your system printer EViews should pick that up.
Re: Problem on saving chart as a pdf by programming.
The default printer is always the last printing device being used by eviews. The system printer unfortunately is not recognized as default for eviews.
Can I use a command to verbally assign a printer as default printer in the printing command?
Right now, I used print chart1 to save chart1 in a pdf format, and it took me to the PDF-writer interface. The question is:
can I ask eviews to hit enter for me? I know eviews can do it to certain programs but I'm not sure how I can achieve it in this case.
Many thanks.
Can I use a command to verbally assign a printer as default printer in the printing command?
Right now, I used print chart1 to save chart1 in a pdf format, and it took me to the PDF-writer interface. The question is:
can I ask eviews to hit enter for me? I know eviews can do it to certain programs but I'm not sure how I can achieve it in this case.
Many thanks.
-
EViews Glenn
- EViews Developer
- Posts: 2682
- Joined: Wed Oct 15, 2008 9:17 am
Re: Problem on saving chart as a pdf by programming.
I never change printers so I wasn't sure about that one. Thanks. Unfortunately, you'll have to change the driver by hand.
Unfortunately, EViews is not going to be able to communicate with the print driver for you. Drivers sometimes have settings that allow you to skip the prompt step, but that's really driver specific.
Unfortunately, EViews is not going to be able to communicate with the print driver for you. Drivers sometimes have settings that allow you to skip the prompt step, but that's really driver specific.
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3798
- Joined: Wed Sep 17, 2008 2:25 pm
Re: Problem on saving chart as a pdf by programming.
Liu,
Gareth is a little distracted at the moment :D
To solve your practical problem, send all your graphs to one spool. Then manually print that one spool to a pdf.
Gareth is a little distracted at the moment :D
To solve your practical problem, send all your graphs to one spool. Then manually print that one spool to a pdf.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Problem on saving chart as a pdf by programming.
Or, find a PDF printing program that has full command prompt support, then save your graphs to disk within EViews and then use the Shell or Spawn commands to trigger the PDF printer.
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3798
- Joined: Wed Sep 17, 2008 2:25 pm
Re: Problem on saving chart as a pdf by programming.
Try irfanView http://www.irfanview.com/Or, find a PDF printing program that has full command prompt support, then save your graphs to disk within EViews and then use the Shell or Spawn commands to trigger the PDF printer.
Re: Problem on saving chart as a pdf by programming.
From what I understand, this limitation is basically solved by using spool and shell commands, as long as the software has command-line interfaces? So the idea is: spawn a command to aI never change printers so I wasn't sure about that one. Thanks. Unfortunately, you'll have to change the driver by hand.
Unfortunately, EViews is not going to be able to communicate with the print driver for you. Drivers sometimes have settings that allow you to skip the prompt step, but that's really driver specific.
cli based pdf writer? (I guess Irfanview meets both requirements since Startz recommended it.)
just a quick question here, can I use spawn/shell to push multiple commands to external software?
such as
Code: Select all
spawn "c:\program\irfanview.exe" save /path/ chart1
exit irfanview.exeWho is online
Users browsing this forum: No registered users and 1 guest
