Choose Language Hide Translation Bar
Highlighted
matt_p
Level I

Script for saving to PDF

Hi all,

I have a bunch of graphs that I would like to save to a pdf.

I currently have

Current Journal()<<Save PDF("C:\Documents and Settings\My Documents\myFile.pdf")

This will save my journal as a PDF, but it will be horribly out of scale and across multiple pages.

If I go through File -> Save As -> PDF then I can chose options for scaling/landscape etc.

Is there anyway to get these options for a script? I can't seem to find anything in the guide or index.

Thanks for your help!

-Matt

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
carole
Level III

Re: Script for saving to PDF

Hi all,

 

here is JSL (JMP10) I use to do what is wanted I think...

 

Regards.

 

 

winJOURNAL = CurrentJournal();
//Define setup information to save in pdf
winJOURNAL         <<     Set page setup(
    margins( 0.5, 0.5, 0.5, 0.5 ),
    scale( 0.8 ),
    portrait( 0 ),
    paper size( "A3" )
);
winJOURNAL         <<     get page setup();//get setup information
//Save as PDF
winJOURNAL        <<    SavePDF("C:\Documents and Settings\My Documents\myFile.pdf");

 

View solution in original post

8 REPLIES 8
Highlighted
joeyjamboadl
Level I

Re: Script for saving to PDF

Hi Matt,

I have a similar problem. Did you get any resolution?

Regards

JJ

Highlighted
tova
Level III

Re: Script for saving to PDF

I would also like a resolution if anyone's found one...

Highlighted
carole
Level III

Re: Script for saving to PDF

Hi all,

 

here is JSL (JMP10) I use to do what is wanted I think...

 

Regards.

 

 

winJOURNAL = CurrentJournal();
//Define setup information to save in pdf
winJOURNAL         <<     Set page setup(
    margins( 0.5, 0.5, 0.5, 0.5 ),
    scale( 0.8 ),
    portrait( 0 ),
    paper size( "A3" )
);
winJOURNAL         <<     get page setup();//get setup information
//Save as PDF
winJOURNAL        <<    SavePDF("C:\Documents and Settings\My Documents\myFile.pdf");

 

View solution in original post

Highlighted
KinKame
Level IV

Re: Script for saving to PDF

exactly what I needed as well ... JMP is so nice :-)  ... my Christmas present

Highlighted
kahart
Staff

Re: Script for saving to PDF

I have had a similar issue.  I found that if I set the window size for each graph prior to adding it to the Journal, I was able to print the Journal and the graphs.

 

example:

 

 

graph1 << size window(920,800);
winJournal()["Graph"] << Apend(Outline Box("Graph",graph1);

 

 

I also used similar code as that above for page setup and also had to set the window size for the Journal;

 

 

winJOURNAL = CurrentJournal();
//Define setup information to save in pdf
winJOURNAL         <<     Set page setup(
  
    scale( 0.7 ),
 
);
winJOURNAL         <<    Set Window Size(920, 1000);

 

 

It took some time to get the sizes correct based on the graphs.  I found it is very important to go through this effort and to test it with different display resolutions.   Generating a pdf with a lower display resolution will change the scale of the graphs.

Highlighted
arronlee
Level I

Re: Script for saving to PDF

Yup indeed, I agree with kahart. Generating a pdf with a lower display resolution will change the scale of the graphs. So have you found out any fine PDF tools to deal with the problem?

Highlighted
none1
Level I

Re: Script for saving to PDF

Hello,

I always do save as ---> PDF and so on.

You can make adjustments to the size of the page, however I have to agree, this is a very bad interface to generate business suitable pdfs.

I hope JMP will look at this issue seriously.

Regards

Highlighted
mattyclown
Level I

Re: Script for saving to PDF

I do not think a 3rd pdf creating tool can offer any proactical help. Maybe you can have a look at following post which uses code to handle the scaling issue of image in pdf.  Anyway, we are looking forward to the expert to offer some guidance.

r - saving graph in pdf or png scaling issue - Stack Overflow

Article Labels

    There are no labels assigned to this post.