[scribus] merging pdf files.

William Bader williambader at hotmail.com
Sat Jul 18 05:31:35 UTC 2015



> Date: Thu, 16 Jul 2015 18:59:16 -0400
> From: John at wexfordpress.com
> To: scribus at lists.scribus.net
> Subject: Re: [scribus] merging pdf files.
> 
> On Thu, 16 Jul 2015 15:01:02 -0400
> William Bader <williambader at hotmail.com> wrote:
> 
> > 
> > > Date: Thu, 16 Jul 2015 14:18:13 -0400
> > > From: John at wexfordpress.com
> > > To: scribus at lists.scribus.net
> > > Subject: [scribus] merging pdf files.
> > > 
> > > I have roughly 200 pdf files that I need to
> > > merge into one file. They constitute the
> > > pages of a book. Some are the product of
> > > Scribus and some are not. Eventually all will
> > > be. All are the same page size. I have tried
> > > pdftk, a Ghostscript command and so on.
> > > Nothing seems to work even on small subsets.
> > > What do you folks use?
> > > 
> > > My environment is Slackware linux 14.1
> > > 
> > > -- 
> > > John Culleton
> > > Wexford Press
> > > Book layout, typesetting and Indexing
> > > Free list of books for self-publishers:
> > > http://wexfordpress.net/shortlist.html
> > 
> > 
> > I have used both ghostscript and poppler
> > pdfunite to combine small numbers of PDFs. With
> > ghostscript, the command would be gs -q
> > -dNOPAUSE -dBATCH -sDEVICE=pdfwrite
> > -dCompatibilityLevel=1.4 -sOutputFile=new.pdf
> > -c .setpdfwrite -f *.pdf It is important to
> > have a recent version of gs like 9.16.
> > http://www.ghostscript.com/ Depending on the
> > files and the version of gs, -dUseFastColor or
> > -dNOGC might make it run faster. If it does not
> > work, you can file a bug report at
> > http://bugs.ghostscript.com/ With poppler
> > pdfunite, the command would be pdfunite *.pdf
> > new.pdf The current release is poppler 0.34.0
> > http://poppler.freedesktop.org/ If pdfunite
> > does not work, you can file a bug report at
> > https://bugs.freedesktop.org Regards, William
> > Bader, Director of Research and Development at
> > SCS, http://www.newspapersystems.com
> > 
> 
> Irony of ironies. The above script blew up. So I
> moved the very first file, just created today
> using scribus  1.5.1, out of contention. Then the
> script you gave me worked like a champ. I'll try
> recreating that first record using 1.5.0.
> 
> Stay tuned. And thanks to all who responded.


John sent me a sample PDF, and the problem is a bug in Scribus.  I submitted a patch at http://bugs.scribus.net/view.php?id=13241

When Scribus 1.5.1 writes hex strings in the PDF, if the hex string is long, Scribus wraps the hex string with a backslash and a new line. Backslashes are not valid in hex strings.
poppler-based utilities report
Syntax Error (483): Illegal character <5c> in hex string
where hex 5c = decimal 92 = the ascii code of a backslash.
ghostscript-based utilities like pdf2ps abort with
**** Error reading a content stream. The page may be incomplete.

You can test it by making a long title with File -> Document Setup -> Document Information and then writing a PDF with File -> Export -> Save as PDF

Regards,
William Bader, Director of Research and Development at SCS, http://www.newspapersystems.com

 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scribus.net/pipermail/scribus/attachments/20150718/69117d5e/attachment.html>


More information about the scribus mailing list