18 Publishing and Export
The Master Page
The Master Page feature is used to add one or more common objects to exported or printed graphs. Use the master page to add a set of properties and objects -- a custom background, a company logo, text labels, images, etc. -- to selected graph windows in your project.
To make use of this feature, you must first create your Master Page. The Master Page should contain only the properties and objects that you want to display on your selected graph windows:
- From the menu, choose File: New: Master Page. If you are not in the project root folder when selecting this menu item, you will be asked to switch to the project root folder.
- Customize the Master Template. Note that the comments that show beneath the Save Master Template button are "hidden" and will not be applied to your graph windows.
- Click the Save Master Template button. When you save, the Master Template will be saved to the User Files Folder as "name of active window".otpu (e.g. "C:\Users\YourName\Documents\OriginLab\User Files\Master.otpu").
Things to know about the Master Page:
- Master items will only show in graphs pages of the same dimensions as the template. Apply Dimension to All Graphs applies Master Template page dimensions to all graphs of the same aspect ratio.
- If you create a graph and modify page size, then choose File: New: Master Page and load a Master Template into the workspace, the Master Template will be loaded with the page dimensions of your modified graph page.
- The Rotate button swaps the Master Template page dimensions (toggles orientation between landscape and portrait).
- When you click Apply Dimension to All Graphs you are prompted to apply dimensions only to graphs of the same aspect ratio, or to all graphs of the same orientation (portrait or landscape).
- Master Page items on a graph with portrait orientation will not show on a graph with landscape orientation and vice versa.
- When NOT using Master Items, Edit: Copy Page (CTRL + J) will place an OLE-editable Origin graph object on the Clipboard. When using Master Items, Edit: Copy Page will place an image on the Clipboard; the Copy Graph as Image dialog will open asking you to accept or adjust image settings before clicking Copy.
- If a graph uses Master Items, Send Graphs to PowerPoint does not support Insert Graphs as Embedded Object. Instead, use Insert Graphs as Picture which does support Master Items.
- There is a mechanism for selectively excluding Master Items in your exported or printed page. Any object that you do not want to appear in the exported or printed page should begin with "NoExport" (e.g. open an arrow object's Properties dialog and on the Programming tab, rename "Arrow" to "NoExport_Arrow").
- When you customize and save your Master Page to the User Files Folder, the next time you choose File: New: Master Page, you load your customized template.
- If you don't want to show Master Items in the workspace, click View: Show: Master Items and remove the check mark. The exported graph will still contain the Master Items (they just won't show in the workspace).
- If you want to remove Master Items from a graph in both the workspace and exported images, click Format: Page..., Display tab and clear the Use Master Items check box.
The Export Margin Offsets Dialog Box
By default, the margins of your copied or exported graph are determined by the Margin Control in Copy Page Settings group of Preferences: Options (Copy actions) or the Export Settings branch of Export Graphs (Export actions). You can interactively modify the default margins using the Export Margin Offsets Dialog Box.
- Click on the graph window (to activate) and choose Edit: Set Export Margins. This opens the Export Margin Offsets dialog.
- Drag the blue selection handles that appear at the page margins; or enter values into the dialog edit boxes and click Apply.
Fit Page to Layer and Layer to Page
There are two small dialog boxes that are also helpful for removing white space or placing a margin around your graph before exporting:
- Fit Page to Layers: Choose Graph: Fit Page to Layers to open the pfit2l dialog box.
- Fit Layers to Page: Choose Graph: Fit Layers to Page to open the gfitp dialog box.
Both dialogs can be used to remove white space. Both can perform resizing, with or without changing graph aspect ratio. You can view the documentation for both to decide which might work best for you but basically it boils down to whether you need to keep a particular page size. If so, you'll likely want Fit Layers to Page; if not, either one may work for you.
Copying and Pasting Graphs to Other Applications
image or as an editable OLE graph object.
There are two ways you can include Origin graphs in another application's files (e.g. Microsoft Word .docx files): as an
- Click on your Origin graph to activate it, then ...
- To copy the graph as a image, choose Edit: Copy Graph as Image (CTRL+ALT+J). Alternately, click on the graph window near the page margin and click the Copy Graph as Image button on the Mini Toolbar.
- To copy the graph as an editable Origin graph object, choose Edit: Copy Page (CTRL+J).
- In your host application choose Paste or press CTRL+V.
When you paste as an image, you are pasting a static object. In MS Word, for instance, you may be able to modify the image using Word's picture-editing tools, but you cannot make edits to the graph in Origin and have it update the graph in Word (short of deleting the existing image and replacing it with a new one).
By contrast, when you paste a graph object you can later double-click on the object in the host application to launch a new instance of Origin. The graph and any associated data sheets will be available for editing. After editing, use Origin's File: Exit and Return to... menu item to update the embedded object, close Origin and return to the host application.
When copying the graph as an image (CTRL+ALT+J), you now have a choice of image formats (PNG, EMF, DIB, HTML, JPG). Additionally, you can make quick size adjustments and specify background transparency (PNG). The Copy Graph as Image (copyimg) dialog includes a Dialog Theme control which allows repeating <Last used> settings, saving current settings as default Save as <default> or saving settings to a named Theme (Save As...).
There is a new Copy control on the Preferences: Options: Page tab that allows you to make use of the CTRL+C hotkey combination to either Copy Graph as Image <last used> or Copy Page (CTRL+J). Thus, you could bypass the Copy Graph as Image dialog described in the previous paragraph by setting this control to Copy Graph as Image <last used> and then using the CTRL+C hotkey combo to copy the active graph as an image and place it on the Clipboard.
Organizing Your Graphs for Presentation or Export
If your Origin project file contains a large number of graphs that you plan to export or use in an Origin slide show, you can make things easier by adding shortcuts to your graphs to a Project Explorer Favorites folder and arranging them there:
- Right-click on a window and choose Add Shortcuts to Favorites. This will add a shortcut to each graph window, to a new Favorites subfolder (visible in Project Explorer).
- When sending graphs to PowerPoint or creating an Origin slideshow, you can (1) set slide order in the corresponding dialog box or (2) set slide order following this procedure.
The Layout Page
A layout page, as the name implies, is a window useful for laying out different elements for publication or export. Use it to assemble graphs, result tables, text objects, etc. onto a single panel.
Typically, you start by creating a blank panel:
- Click the New Layout button on the Standard toolbar.
- Right-click on the blank layout to paste Clipboard content, add text, insert images from files, add graphs, tables, etc.
- When inserting an image from file, right-click in the area where you want to insert. When adding graphs or worksheets, pick a window in the Browser and drag out an area on the layout with your mouse. Note that added objects can be moved or resized by dragging with your mouse.
- You can make edits to inserted images, by double-clicking on the image. This opens the image in the Image Window.
- You can make edits to the graph by double-clicking on the inserted graph object. This opens the source graph for editing. Edits to the source graph will update the graph on the layout page.
- Inserted tables can be edited by double-clicking on the table object. Style adjustments can be made by selecting a table object and using available Mini Toolbar buttons.
- Note that selected elements on the layout page can be aligned using Object Edit toolbar buttons.
Origin 2022 adds support for inserting *.SVG images into the layout page.
For more on the layout page, see Using the Layout Page Window in the Origin Help file.
Merge Graphs to Layout
As an alternative to manually creating layouts, Origin offers a tool that will merge select graphs into a single layout page of equal spacing. In this case, merged graphs are images and, therefore, not editable using the procedure described in step #3 of the previous section. However, if further graph edits are not needed, you can use this method to quickly produce a nice-looking layout.
To merge graph images into a single layout:
- With a graph window active, click Graph: Merge Graph to Layout: Open Dialog.
- Use the Selection drop-down to specify how to select graphs. To choose individual graphs, choose Specified and use the browse button beside Graphs to open the Graph Browser and pick graphs.
Exporting Graphs and Layout Pages to an Image File
Origin 2021b added a simplified graph export routine to complement the existing graph export routine:
- File: Export Graph: If you simply want to export one or two graphs to one of several common image format (PNG, BMP, JPEG, TIFF, EMF) and need only minimal control of image size, this routine is quick and easy.
- File: Export Graphs (Advanced): If you want to batch export graphs (e.g. All in Active Folder, All in Project, etc.), or export to vector types such as PDF or EPS, use this routine. The dialog supports outputting to a specified path, auto naming, application of Speed Mode settings to exported graphs, plus margin control, image size and other filetype-specific settings.
See the following sections, for more information.
File: Export Graph
File: Export Graph (X-Function = expG2img) is a simplified routine for exporting the active graph page to one of the following formats: PNG, BMP, JPEG, TIFF, or EMF. It does not offer the level of control or flexibility as File: Export Graphs (Advanced) (next section) but it works well for simple export of individual graph pages.
To export using expG2img:
- When a graph window is active, choose File: Export Graph.
- For EMF images, set a size factor relative to the Image Size reported at the bottom of the dialog. For raster formats, choose an output DPI setting. Alternately, clear the Auto check box and specify a Width in Pixels.
Origin 2022 adds graph size reporting and a DPI control for raster formats. Additionally, EMF is added as an output option.
File: Export Graphs (Advanced)
File: Export Graphs (Advanced) (X-Function = expGraph) is Origin's primary tool for exporting graphs and layout pages. It supports raster or vector output, flexible multi-page export (e.g. All in Active Folder), DPI and Speed Mode control and more.
To export a graph or a layout page as an image file:
- Select the menu File:Export Graphs (Advanced).
The expGraph routine exports graphs to one of 14 file formats:
| Raster Formats
|| BMP, GIF, JPG, PCX, PNG, TGA, PSD, TIF;
| Vector Formats
|| CGM, DXF, EPS, EMF, PDF, WMF
Saving Export Settings to a Theme
As is the case with many other Origin dialog boxes, you can save your graph export settings as a Dialog Theme for repeat use.
Once you have determined your export settings:
- Click the flyout button to the right of Dialog Theme and choose one of the Theme save options.
- Using any group of custom settings creates a temporary default Theme called <Last used>. This Theme then becomes available for loading your last used settings and you can access it from the expG2img or ''expGraph dialog boxes or from the File: Recent Exports menu.
Since Origin 2021, expGraph dialog box settings are saved to the graph automatically on export.
- To save current settings withtout exporting, choose Save to <Graph>.
- To restore saved settings after you've modified them in the export dialog, choose <Graph>
You can export multiple graphs, such as all graphs in a folder or all graphs in a project file, to a single, multi-page PDF file. Choose File: Export Graphs and open the Export Graphs dialog box. Set Image Type to Portable Document Format (*.pdf) and Select Graph(s) to one of the following options and you will see a checkbox for Export as multi-page PDF file.
Send Graphs to PowerPoint
Master Items, explained above). Graphs inserted as embedded objects can be further edited in your Origin software. Double-click on the graph in PowerPoint to open the graph in an OLE instance of Origin.
You can send a group of Origin graphs to MS PowerPoint as pictures or as embedded objects (see limitations of embedded objects and
To Send Graphs to PowerPoint:
- Click the Send Graphs to PowerPoint button on the Standard toolbar.
- Click the Send Graphs to PowerPoint icon in the Apps Gallery, docked to the right-side or your Origin workspace (if you do not see the Apps Gallery, click View: Apps or press ALT + 9).
- Right-click in the lower-pane of Project Explorer and choose Send Graphs to PowerPoint.
Send Graphs to PowerPoint now supports including holder book and sheet names of worksheet-embedded graphs, when slide Title is set to Custom > Book/Sheet.
Slide Show of Graphs
Origin has a built-in slideshow utility for viewing or presenting your graphs while running Origin. The slide show can be started in two ways:
- Right-click on any folder in Project Explorer and select Slide Show of Graphs...
- Click the Slide Show of Graphs button on the Standard toolbar.
A dialog box opens offering options to set slide order, slide cycle time, whether to include graphs in sub folders, etc. The dialog also lists shortcut keys for use during the slide show (e.g. G = go to the actual graph window of the currently displayed slide).
Tutorial: Slide Show of Graphs
- Use the File: Open Sample Projects: 2D and Contour Graphs menu to open the sample project.
- Click on the Slide Show of Graphs button in the Standard Toolbar.
- Accept default settings in the dialog that opens, and press OK to start the slide show.
- You can use the up/down arrow keys or the mouse wheel to flip thru the slides.
Video Builder tool, accessible from the Open Video Builder button on the Standard Toolbar. This tool can be used to manually capture a series of graph windows, and write one frame at a time to a video (.AVI) file.
Origin provides a
Videos can be created using LabTalk script or Origin C code, by programmatically computing or updating data and then writing out the graph as a frame in the video, at each step during the computation.
|Note: For more information, please refer to the:
Help: Origin: Origin Help > Exporting and Publishing Graphs > Creating Graph Animation
For specific examples of programmatically created movies, including Origin Projects and code, please visit www.originlab.com/animation.
Exporting Worksheets and Matrices
With a worksheet active, the File: Export menu item provides the following options:
- ASCII, NI TDM (TDM, TDMS), and Sound (WAV)
- This option is available only for sheets containing data columns, and is not available when report sheets such as those created by the Nonlinear Fitting tool are active. The exported file will contain only data from the worksheet columns. Floating or embedded graphs placed in the worksheet will be ignored.
- Export books of worksheet columns with text and numeric data to an MS Excel file (XLS, XSLX, XSLM). Note that analysis report sheets with their hierarchical tables, and things such as embedded graphs and images, are not exported to the Excel file. Analysis results that are output to regular Origin worksheets are exported.
- This option exports the active worksheet(s) as an SQLite file. Specify a file extension of .sqlite, .sqlite3 or .db (note that file structure is identical). Options to skip hidden columns or rows. Limited to export of data in worksheet columns.
- As Multipage PDF File
- This option is available only on sheets with data columns, and not for report sheets. Use the View: Page Break Preview Lines menu item to view the vertical and horizontal page break lines that determine which columns and rows will be included in each page of the export. Floating or embedded graphs placed in the worksheet will be included in the exported image.
- As Image File
- This option is available on both data and report sheets. In the dialog that opens, you can select whether to export the entire sheet, visible area, or selection. Image file formats including PDF are supported. Floating or embedded graphs placed in the worksheet will be included in the exported image.
- As PDF File†
- This option is available for both data and report sheets. In the dialog that opens, you can opt for exporting the entire sheet, the visible area, or a selection. Floating or embedded graphs are included in the exported PDF.
When creating a custom report from a worksheet that combines data, numeric results and graphs, the best option is to export the entire sheet as a PDF file, or export the sheet as a multi-page PDF file.
Exporting a Matrix
Origin matrix data can be exported in these two formats:
- This will create an ASCII file of the data contained in the active matrix object.
- This option will export the image view of the active matrix object, as a raster file.
HTML Reports from Notes Windows
You can create HTML reports using Notes windows. Build your HTML report using placeholders that link to report sheet elements such as metadata, statistical results or graphs. The resulting HTML report can be printed or exported; or it can be incorporated into your Analysis Template.
Reports can also be created using Markdown syntax instead of HTML. If Markdown syntax is used, optional HTML syntax can be also included for advanced customization.
To use this feature, the user should have some basic familiarity with HTML or Markdown, and as with most things, the more proficient the user is, the easier it will be to create professional-looking output. However, the skill needed to generate a basic report can be easily mastered. See this OriginLab blog post for guidance.
The basic steps of creating reports using an Origin Notes window, are as follows:
- Create your project to include graphing and analysis results.
- Click the New Notes button to add a Notes window.
- From the menu, choose HTML: Syntax, then choose HTML or Markdown (Hint: You can toggle between text/view and markup modes by pressing CTRL+M and you can choose the default syntax by setting LabTalk System Variable @NPS).
- You can write your code in the Notes window's markup mode or you can use a text editor such as Notepad++, then copy and paste it to your Notes window. If you have no experience with HTML or Markdown, you may want to load samples by activating your Notes window and clicking HTML: Load Samples (HTML = ".html", Markdown = ".md").
- You will likely want to incorporate graphing and analysis results from the current project, into your report. The simplest way to do this is to insert "placeholders" for each Origin object that you intend to include in your report, into your code. These placeholders can be named using any string that makes sense to you and they should be enclosed in double-curly braces (e.g.
- Right-click on the Notes window title bar and choose Edit Placeholders. Placeholders that you have incorporated into your code will be picked up and added to a Placeholders worksheet in the workbook. The sheet will list, in column A, all of the placeholders found in your code. A second column -- Column B -- is blank and is reserved for adding the associated Origin objects (i.e. the variables, analysis and graphing results, etc.) that you want to include in your report.
- For each placeholder in column A, find the associated Origin object and copy it to the Clipboard (e.g. if it is a numeric quantity in a sheet resulting from some statistical analysis, select the cell quantity, right-click and choose Copy, or press CTRL+C on your keyboard).
- Return to the Placeholders sheet, right-click in column B, beside the associated placeholder and choose Paste-Link. This associates your placeholder with the intended Origin object.
- If you intend to include your HTML report in an Analysis Template, you can right-click on a workbook tab in your Analysis Template and choose Add Notes as Sheet. This inserts your Notes window into workbook and you can now choose File: Save Workbook as Analysis Template.
When a Notes window is active, you can click the HTML menu and load a sample HTML file into the Notes window.
Using Your HTML Report
As you fill in your Placeholders sheet, you should see your HTML report take shape in the Notes window. Once completed, you can do various things with your HTML report, including:
- Print to hard-copy or to PDF (File: Print).
- Export the window as a webpage (HTML: Export to Webpage).
- Click the embed button in the upper-right corner of the Notes window to embed the content into your workbook, then save the workbook as an Analysis Template (File: Save Workbook As Analysis Template).
Topics for Further Reading