To export multiple pages in a Grapher project to a single PDF:
- Copy the script below.
- Open Grapher and turn on the Script Manager by clicking View | Display | Script Manager.
- Press Ctrl+A to select all of the existing lines in the Script Manager and then press DELETE.
- Press Ctrl+V to paste it into the Script Manager.
- Update the filename, filepath, and numpages in the User-defined variables section to be appropriate for your needs.
- Click the Start/Resume icon () in the Script Manager.
- Once the file has completed running, you should have one PDF for each page. You can combine them into one in Adobe Acrobat Pro DC or some free online PDF merge/join software.
If you would like to print/export multiple pages to a single file without having to combine multiple files with a third-party application, please let us know!
Sub Main 'Create Grapher as an Object Dim Grapher As Object Set Grapher = CreateObject("Grapher.Application") Grapher.Visible = True '====================================== 'User-defined variables '====================================== 'Path and Name of the project file to open and export filepath = "C:\Users\L\Desktop\" filename = "MultiPage.gpj" 'Number of pages in the project numpages = 5 '====================================== 'Open file Set Plot1 = Grapher.Documents.Open(filepath+filename) 'Export objects to specified file For i=1 To numpages Plot1.SetActivePage(i) Plot1.Export2(filepath+"Export"+Str(i)+".pdf",False,"FitPage=0",True,"pdfv") Next End Sub
Updated March 4, 2019
Comments
Please sign in to leave a comment.