The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 automated printing
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

domuk

United Kingdom
4 Posts

Posted - 05/16/2011 :  08:04:50 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic

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

Hideo Fujii

USA
1582 Posts

Posted - 05/16/2011 :  10:29:59 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

domuk

United Kingdom
4 Posts

Posted - 05/16/2011 :  10:48:51 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

Laurie

USA
404 Posts

Posted - 05/16/2011 :  2:02:09 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

domuk

United Kingdom
4 Posts

Posted - 05/17/2011 :  08:17:53 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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.
Go to Top of Page

Laurie

USA
404 Posts

Posted - 05/17/2011 :  3:13:43 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
page.dimupdate(); //fit page to printer

The Windows default printer is always used.

OriginLab Technical Support
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000