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 for Programming
 LabTalk Forum
 print graph with PDFCreator automatically
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

asenv

35 Posts

Posted - 11/14/2010 :  09:58:23 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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.

easwar

USA
1965 Posts

Posted - 11/14/2010 :  2:12:49 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
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