cancel
Showing results for 
Search instead for 
Did you mean: 

PDF Compression

jordiv
Champ on-the-rise
Champ on-the-rise
Hello,

I would like to know if it's possible, using a web script, to compress an uploaded PDF file using ghostscript or any other similar library. Or if Alfresco provides any other way to compress PDF files.

Cheers,
Jordi.
1 REPLY 1

openpj
Elite Collaborator
Elite Collaborator
You have to implement a custom action in Java that uses the ghostscript library imported as a JAR in the container.
Then you have to add the Spring context for the new action with all the dependencies that you need to use.
Then you can execute the new action from a WebScript to compress the specified file.

Custom Actions:
http://wiki.alfresco.com/wiki/Custom_Actions

Javascript Actions API:
http://wiki.alfresco.com/wiki/3.4_JavaScript_API#Actions_API

Hope this helps.