DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Compress Images on Report

Solved!
Go to solution

Hello

 

I am currently generating a report which requires a tonne of photos. 

 

The photo file sizes vary between 4 and 10 MB per photo.

 

When I generate a .PDF of my DIadem report the file size is quite large.  Is there anyway to compress the image similar to  "Compress Pictures" function in excel?

 

Thanks

Tim
0 Kudos
Message 1 of 18
(5,973 Views)
Solution
Accepted by topic author smoothdurban

Hi Tim,

 

You can affect JPEG compression and PDF resolution with program variables by setting them in a DIAdem Script. The program variables you would want to set are discussed in these help documents:

 

http://zone.ni.com/reference/en-XX/help/370858M-01/varoff/pdfjpgcompressed/

 

http://zone.ni.com/reference/en-XX/help/370858M-01/varoff/pdfresolution/

 

Hope this helps,

Kevin F

Applications Engineer

0 Kudos
Message 2 of 18
(5,947 Views)

This helps immensely

 

I was able to take a report of 85 MB and compress it to 1.75!

 

All I had to do was add the following code to my report script

 

PDFJPGCompressed = "high"

 

 

Tim
0 Kudos
Message 3 of 18
(5,940 Views)

Awesome, I'm glad that worked so well for you!

 

Kevin F

Applications Engineer

0 Kudos
Message 4 of 18
(5,912 Views)

Hello

 

I have tried using this with PDFResolution but it does not have the same desired effect.

 

 

Is there a partcular place I shoud be setting my PDFResolution before I call PicPdfExport?

 

 

 

Current I set:

       PDFResolution = "72 DPI"
      Call PicPdfExport(PDFFilename, false)

 

Will this have the disered effect?

Tim
0 Kudos
Message 5 of 18
(5,828 Views)

Hi Smooth,

 

Your two lines of code look fine to me.  The PdfResolution variable is a global variable that just needs to be set prior to call the PicPdfExport() command.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 6 of 18
(5,817 Views)

Thanks Brad.

 

The file  PDF file size is quite large and exceeds my 17 MB limit on allowable report size.

 

Any other ideas on how to compress the .pdf report file?

 

 

Tim
0 Kudos
Message 7 of 18
(5,791 Views)

Hi Tim,

 

There are a total of 4 variables you can use to potentially minimize the size of the resulting PDF, depending on what you have on your REPORT layout sheets.  Please give the other two a try and see if that helps:

 

PDFFontsEmbedded

PDFJPGCompressed

PDFOptimization

PDFResolution

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 8 of 18
(5,781 Views)

Hey Brad

 

I have changed all of the variable to the following and I do not see any change in file size.  I have a 5 page report at ~ 4MB!

 

PDFJPGCompressed = "high" 
PDFFontsEmbedded = true
PDFOptimization = true
PDFResolution = "72 DPI"

Is this normal for a five page report?  I would of though its size on disk would be significantly smaller.

 

Tim
0 Kudos
Message 9 of 18
(5,776 Views)

Hi Tim,

 

No that's not normal.  Do you have 3D graphs on any of those pages?  They tend to take up a lot of memory.  Can you send over a data set and TDR for us to investigate?

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 10 of 18
(5,768 Views)