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
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 print graph with PDFCreator automatically

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
asenv Posted - 11/14/2010 : 09:58:23 AM
Origin Ver. and Service Release (Select Help-->About Origin): OriginPro 8.1G SR3
Operating System:win pro 2000 sp4

Hi,
is it possible to automate printing jobs through Origin (with some for example open source printer driver like PDFCreator or Bullzip ...)? In the LabTalk manual I found this command:
win -o Graph1 print;

, but is there a way to set some argumens like name of the file and path and for example whether to replace a file or not?
I searched for something like this in the OriginC manual, but found one example function that I changed to:
int PageBase_Print_ex1()
{
    GraphPage gp = Project.GraphPages(0);                                // Page to print
    if( gp )
    {
        Tree tree;
        //tree.Printing.PrinterName.strVal = "Canon Bubble-Jet BJC-2000";    // Ignore default printer, use Canon instead
        //tree.Printing.NumberOfCopies.nVal = 2;                            // Print 2 copies
        //tree.Printing.DPI.nVal = 300;                                    // Resolution 300 dpi
        //BOOL bResult = gp.Print(tree);
    	tree = gp.GetFormat(FPB_ALL, FOB_ALL, true, true);  // can set a break point on this line
		out_tree(tree);  // output tree structure
    }
    return 0;
}

to see all the methods and properties, but I found that to printing were only theese related:

|--Printing
| |--PrinterName = Adobe PDF
| |--DPI = 1200
| |--NumberOfCopies = 1
| |--PaperSource = 15


My other idea is to set the configuration opens from labview to the printer driver prior to calling this command "win -o Graph1 print;" so the printer does not open dialog and saves the file at the configured locations with the configured name. I am working on that, but at the moment with no success. Any help greatly appreciated.

1   L A T E S T    R E P L I E S    (Newest First)
easwar Posted - 11/14/2010 : 2:12:49 PM
Hi,

Are you looking to export ALL GRAPHS as PDF?

If yes, then look at the expGraph X-Function. You can open the dialog from File->Export Graphs and then select all graphs in project, select options such as using the long name of the graph as the file name, and also option to overwrite or enumerate etc. And then select image type as PDF, so you don't need to use an external driver to export your graphs to PDF. You could save your settings as a theme and then call that theme from script to run the job again in the future. You can also loop over all graph pages and call the expgraph X-Function for each, specifying path and desired file name etc.


Easwar
OriginLab

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000