cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
Neo
Neo
Level VI

Control PDF resolution while saving a journal as PDF

I create JMP journal based reports which I then save as PDF for sharing. The saved PDF sizes are currently typically >20MB. I am wondering if it is possible to control (in my JSL script for saving) the resolution of the graphics so as to bring the sizes of PDF reports below 10MB? If yes, could I please get an example?

When it's too good to be true, it's neither
5 REPLIES 5
Craige_Hales
Super User

Re: Control PDF resolution while saving a journal as PDF

Without actually trying it, 20 MB seems reasonable for 20 graphs. How many graphs have you put in the PDF?

 

Ideas (no promises!)

 

1) I'm assuming the PDF has a graph with a lot of data points, and maybe the graph is kept as a vector object (for scaling) in the PDF rather than an image. Then this might help (by making only a picture available when the PDF is generated):

 

Search JMP help for "freeze"Search JMP help for "freeze"

 

2) (less likely to be applicable) In the Windows prefs there are options for RTF and HTML picture formats. JPG might be smaller than PNG. I don't know if they would apply.

 

3) I think there may be more than one way to get a PDF from JMP, using different converters. <<savePDF vs some print driver that you might have. Not sure how you'd control the print driver's file location, but it might tell you what could be possible.

 

4) Not sure how the <<savePDF deals with closed outlines, but try closing/hiding/deleting sections you don't need to keep.

 

 

Craige
Neo
Neo
Level VI

Re: Control PDF resolution while saving a journal as PDF

Thanks @Craige_Hales for your inputs. Yes, there are about 21 graphs which make up about 23MB of PDF file size and each graph has lots of points (half of them are heatmaps). Below is the script/function I use for saving the PDF (also saves the data file in specified format).

Could I please get some direction/examples on how to use/check the four options you mention above?

Names Default To Here (1) ;

saveDataAndJournalFile = Function({partID, path, fileFormat}, {},

dt = current data table ();
dt << save as ( path || "\" || ""||partID||""||fileFormat||"" );
currJournal = Current Journal();
currJournal << set page setup(margins( 0.5, 0.5, 0.5, 0.5 ), scale( 0.55 ), portrait( 0 ), paper size( "A3" ));
currJournal << get page setup();
currJournal << Save PDF ( path || "\" || "Report for "||partID||".pdf" );

return();
);

Do the four options you mention apply at the point of creating the journal or post creation of the final journal ready to be saved in chosen format (PDF in this case)?

(I may not be able to deal with the situation in a easy manner if it is the former)

When it's too good to be true, it's neither
Craige_Hales
Super User

Re: Control PDF resolution while saving a journal as PDF

In a perfect world, you would do it when making the journal, but it isn't too late!

 

x=currentjournal();
boxes = x<<clonebox;
x<<closewindow;
boxes<<journal("freeze frames");

 

Above captures the displayboxes out of the old journal and makes a new one. You should experiment with the freeze frames vs freeze pictures because they have different behaviors. freeze pictures grabs a bigger chunk of the display box tree, which may have issues spanning pages. freeze frames grabs just inside the axis, and may leave the journal (but not the pdf) in a situation where the axes move independently of the content.

Craige
Craige_Hales
Super User

Re: Control PDF resolution while saving a journal as PDF

If this works for you, you get to decide how big the graphs in the old journal are before you capture a picture, which will determine the picture's data storage size...

Craige
Craige_Hales
Super User

Re: Control PDF resolution while saving a journal as PDF

It does make it smaller sometimes. I think it depends on the type of graph and the type of data if it gets smaller or not. Two pdfs attached...zooming in reveals 'after' is a bitmap that looks blocky and 'before' is some sort of scalable vector representation that holds up well. After is a little more than 1/3 the size of before. I used 9999 random points.

Some graphs will get larger when converted to pictures. I think you can expect ~500KB per picture based on this example, which probably does what you need.

 

Craige