Hi Yann,
I use the script below so I don't have to specify the details each time I save the pdf.
- Create a journal
- Send my graphs to the journal
- Add a save pdf button which has my preferences specified (you will need to experiment with the margins and scale factor)
- Press the button to generate the pdf
Note: if the folder for the save location doesn't exist or JMP can't write to it the script will fail but not warn you.
Use: Current Journal() << Append( H List Box( Page Break Box(), ) to start a new page.
Regards,
Stephen
//set file properties
//(if location doesn't exist or JMP can't write to it the script will fail silently)
SaveLocation = "C:\Reports\";
Author = "My Name";
Title = "My Report";
//Create a journal to recieve the output
ResultWindow = New Window( Title, <<journal );
//add output
Current Journal() << Append(
Graph Builder(
Size( 534, 500 ),
Show Control Panel( 0 ),
Variables(
X( :Prototype ),
Y( :Name( "Sucre 1/3 [%]" ) ),
Y( :Name( "Sucre 2/3 [%]" ), Position( 1 ) ),
Wrap( :Voies )
)
)
);
//add a save button to the Journal Window
Current Journal() << Append(
H List Box(
Button Box( "Save As PDF",
thisWin = Current Window();
thisWin << Set page setup(
margins( 0.4, 0.4, 0.7, 0.7 ),
scale( 0.7 ),
portrait( 1 ),
paper size( "A4" )
);
thisWin << Set Print Footers(
Author/*left*/,
"&d;"/*center*/,
"Page &pn; of &pc;"/*right*/
);
path = SaveLocation || title || Char(Long Date( Today() )) || ".pdf";
thisWin << Save PDF( path );
),
)
);