03-09-2016 01:39 PM
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
Solved! Go to Solution.
03-10-2016 01:25 PM
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
03-10-2016 01:39 PM
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"
03-11-2016 02:04 PM
Awesome, I'm glad that worked so well for you!
Kevin F
Applications Engineer
03-18-2016 12:18 PM
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?
03-19-2016 12:04 PM
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
03-21-2016 06:09 AM
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?
03-21-2016 09:28 AM
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
03-21-2016 09:48 AM
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.
03-21-2016 01:49 PM
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