Programming challenge

54 views
Skip to first unread message

Lew.Gr...@gov.bc.ca

unread,
Feb 22, 2013, 2:35:09 PM2/22/13
to geop...@googlegroups.com

 

Hi Pythoneers,
 
I had an idea to write a python script that compresses PDF maps to save on disk space.  The idea being that if it is convenient for a user to compress their PDFs, they are more likely to do so as opposed to using the Adobe manual functions. 

 

After struggling with writing a script I realized that it was beyond of my current programming ability.  Instead of ditching the idea, perhaps someone wants to take up the challenge.
 
The functionality should include the following:
- compress PDFs in a folder that a user selects and recursively compress all PDFs in a work area.  It should probably just probably just be limited (??) to map PDFs that can be recreated if it screwed up.
- deletes any uncompress versions
- should compress multi-page PDFs
- other?
 
Some references that I found:
http://pybrary.net/pyPdf/  - the pyPdf module has been loaded to the ArcGIS 9.3 test server
 
Thanks
Lew
 
 
 
 
 
 
 

thak

unread,
Feb 22, 2013, 11:44:38 PM2/22/13
to geop...@googlegroups.com, Lew.Gr...@gov.bc.ca
Hey Lew,

I doubt that compressing PDF files will amount to significant if any space savings, since PDF format is a compressed file format.

Dan

Lew.Gr...@gov.bc.ca

unread,
Feb 25, 2013, 11:35:23 AM2/25/13
to geop...@googlegroups.com, Lew.Gr...@gov.bc.ca
Hi Dan,
 
I tested a 23.9MB PDF map with Adobe Standard and it reduced the file size to 14.6 MB.
 
Here is information from the Adobe Standard Help: "the Reduce File Size command resamples and recompresses images, removes embedded Base-14 fonts, and subset-embeds fonts that were left embedded. It also compresses document structure and cleans up elements such as invalid bookmarks. If the file size is already as small as possible, this command has no effect."
 
Lew

tha...@gmail.com

unread,
Feb 26, 2013, 12:39:20 AM2/26/13
to geop...@googlegroups.com
Wow. Who knew.
--
You received this message because you are subscribed to the Google Groups "Python - ARCGIS geoprocessing" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geopython+...@googlegroups.com.
To post to this group, send email to geop...@googlegroups.com.
Visit this group at http://groups.google.com/group/geopython?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 


-- 
Sent down the wire with Ubuntu Linux. The choice of the GNU generation.
Reply all
Reply to author
Forward
0 new messages