[Discuss] Scripting/Programming Challenge

brendan brendan at ming.org
Wed Jun 3 11:15:25 PDT 2015


here you go. updated version attached.

line 63: add -r and --replace options
line 183: add metafile to rm list
lines 187-193: remove infile and rename outfile to infile

i haven't tested it, but it ought to work. the changes are pretty simple.



On 15-06-02 08:09 PM, Murray Strome wrote:
> I am leading a new SIG at the Victoria Computer Club -- Scribus (a free,
> open source, cross platform Desktop Publishing (DTP) software package).
> 
> The normal output from Scribus is a PDF document. I have found that the
> documents created tend to be VERY large.  I found a Perl script (which I
> modified slightly) which does an excellent job of compressing the
> original PDF document, usually by a factor of 10-15. I have been unable
> to see any significant difference in the quality of documents PRINTED
> from the original or compressed result. The main difference between the
> two that I have noticed is that in the compressed version, you cannot
> search for or copy any of the text in it on your computer. I suspect
> that the text is converted to vector form, but am not certain.
> 
> I have attached the Perl Script.
> 
> My normal work-flow is to run the script:
> compress-newsletter.pl {original file name}.pdf
> 
> the result is {original file name}.new.pdf
> 
> The script cleans up a lot of the temporary files it creates, but does
> leave a file {original file name}.meta, which really should be deleted
> within the script (I delete it manually).
> 
> Normally, I then do:
> rm {original file name}.pdf
> mv {original file name}.new.pdf {original file name}.pdf
> 
> It would be nice if the script were modified so that
> a) the meta file is removed automatically
> b) an option would be to replace the original file.  I would suggest
> that running it without any option would leave both files, but doing:
> 
> 
> compress-newsletter.pl -r {original file name}.pdf
> 
> would result in the original file be replaced.
> 
> ----------
> 
> Now comes the more interesting challenge:
> 
> Virtually all of the people attending the Scribus SIG are using
> Windows.  It would be great to have a GUI to run this script in Windows
> to accomplish this task.
> 
> Anyone interested in the challenge of creating something like this (it
> would be even nicer if it would run in LINUX and OS-X)?
> 
> Murray
> 
> 
> 
> 
> _______________________________________________
> Discuss mailing list
> Discuss at vlug.org
> http://lists.vlug.org/mailman/listinfo/discuss
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: compress_newsletter_new.pl
Type: application/x-perl
Size: 9035 bytes
Desc: not available
URL: <http://vlug.org/pipermail/discuss_vlug.org/attachments/20150603/5c99bac8/attachment.pl>


More information about the Discuss mailing list