BookmarkSubscribeRSS Feed
Choose Language Hide Translation Bar

JMP Script Question regarding saving Journal as PDF

Hoping someone can help out with the following question,

At the moment I'm saving jmp journals in a pdf format. Part of this process involves modifying the "page scale" setting under the "page setup" dialog box that pops up during the process.

Unforetuneatly, I don't see any instructions/examples where I can automate sending a script command to set the value of the page scale. Can this be done?

Appreciate your help. Thanks,


Community Trekker


Jun 23, 2011

JMP Script Question regarding saving Journal as PDF


Here is one way to modify the pdf's properties after creating it - via Perl and MS COM.

The Perl script can be kicked directly from JSL

Best regards,




# References


# NESUG 2010 Multiple Methods in JMP® to Interact with R


# NESUG 2009 Automating JMP via Scripting tools and MS Windows COM



// open existing journal

jrn = Open("C:\Documents and Settings\mjflynn\My Documents\frb.jrn");


// save as pdf

jrn << Save pdf("C:\Documents and Settings\mjflynn\My Documents\frb.pdf" );

// modfiy saved pdf via Perl

SaveTextFile( "C:\temp\","



     use strict;

     use warnings;

     use PDF::API2;

     # Create a blank PDF file

     $pdf = PDF::API2->new();

     # Open an existing PDF file

     $pdf = PDF::API2->open('frb.pdf');

     # Set the default print setting for page scaling to none.


     # Add a blank page

     $page = $pdf->page();

     # Retrieve an existing page

     $page = $pdf->openpage($page_number);

     # Set the page size


     # Add a built-in font to the PDF

     $font = $pdf->corefont('Helvetica-Bold');

     # Add an external TTF font to the PDF

     #$font = $pdf->ttfont('/path/to/font.ttf');

     # Add some text to the page

     $text = $page->text();

     $text->font($font, 20);

     $text->translate(200, 700);

     $text->text('Hello World!');

     # Save the PDF



SaveTextFile( "C:\temp\deleteme.bat",

                "C:\Perl10\bin\perl C:\temp\"    


Open( "C:\temp\deleteme.bat" );


Community Trekker


Feb 17, 2013

Re: JMP Script Question regarding saving Journal as PDF

How can I use Perl to change the orientation of my pdf file to landscape?