T O P I C R E V I E W |
domuk |
Posted - 05/16/2011 : 08:04:50 AM hi, using origin since 3 months, I'm really a newbie in the labtalk scripting.  I'm trying to export my datas as single pdf file for each project.
I found that this is possible by printing to a file with pdfcreator.
What i'm trying to automate is : - "select all" in a project (book with multiple sheets + graphs + tables) - print to file, then choose PDFcreator as printer instead of the default one (found something about that in the help section, but I might have missed a step somewhere.)
- give the name of the opj to the output file
- associate a button to this script (this one, I figured out )
is what I'm trying to do is possible ? thx a lot for any help.
Origin Ver. and Service Release (Select Help-->About Origin): 8.5.0 sr0 Operating System: windows 7 x32 |
5 L A T E S T R E P L I E S (Newest First) |
Laurie |
Posted - 05/17/2011 : 3:13:43 PM page.dimupdate(); //fit page to printer
The Windows default printer is always used.
OriginLab Technical Support |
domuk |
Posted - 05/17/2011 : 08:17:53 AM thx Laurie, this is where I am now :
int nbooks = 0; // Get the name of this folder string strPath; pe_path path:=strPath; // Loop over all Workbooks ... // Restricted to the current Project Explorer Folder View doc -ef W { int nsheets = 0; // Loop over all worksheets in each workbook doc -e LW { print win -o; nsheets++; } doc -e P print win -o; //to print also the graphs }
now I have to find out how to make the page setup "fit to page" and choose the printer for that. |
Laurie |
Posted - 05/16/2011 : 2:02:09 PM You can use the document -e command. Click the link below for examples:
http://www.originlab.com/www/helponline/Origin/en/Programming/mergedProjects/LabTalk/Script/Looping_Over_Objects.html
OriginLab Technical Support |
domuk |
Posted - 05/16/2011 : 10:48:51 AM thx, that's what I did : select all manually in the project folder, right click and print as pdf using PDFCreator. Then in PDFCreator, re-select again all pending work, and "combine all" in single file.
My trouble is to find out how to automate the origin part in a script "select all > print > choose a specific printer and > give an output filename" ... I have like 500 opj files to export like that  |
Hideo Fujii |
Posted - 05/16/2011 : 10:29:59 AM Hi Domuk,
Origin currently cannot export multiple worksheets as a single PDF document (or print as a single print job) though you are able to export them as separate documents. We have already received similar requests and investigating whether it is possible to implement, or not in future release.
If making only graphs as a single PDF is possible by the following work-around: 1) Right-click the folder (or root folder) in the Origin project explorer, and send the all contained graphs to a single PowerPoint document. 2) Print the PP document as a PDF document.
Best,
--Hideo Fujii OriginLab |