Code covered by the BSD License  

Highlights from
append_pdfs

5.0

5.0 | 4 ratings Rate this file 79 Downloads (last 30 days) File Size: 4.55 KB File ID: #31215

append_pdfs

by Oliver Woodford

 

27 Apr 2011 (Updated 10 Apr 2012)

Append/concatenate multiple PDF files into a single file using Ghostscript.

| Watch this File

File Information
Description

This function appends multiple PDF files to an existing PDF file, or concatenates them into a PDF file if the output file doesn't yet exist. This can be much faster than appending PDFs one at at time.

This function requires that you have ghostscript installed on your system. Ghostscript can be downloaded from: http://www.ghostscript.com

It also includes code from the export_fig package to interface with Ghostcript.

Acknowledgements

Export Fig inspired this file.

MATLAB release MATLAB 7.11 (R2010b)
Other requirements Ghostscript
Tags for This File  
Everyone's Tags
append, append pdf, concatenate(2), pdf(2), pdfs
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (13)
02 Apr 2013 Courtney

Bitmap/vector problem appears to have resolved itself. Disregard my question. Thanks!

02 Apr 2013 Courtney

Hi Oliver,
Thanks for your suite of image exporting functions. I'm having an issue with complex (large, ~15MB) vector-rendered pdfs being transformed to bitmaps when combined, and getting pixelated. Any way around this?

26 Feb 2013 Claudia  
21 Aug 2012 Ben Noffke  
10 Apr 2012 Christoph david  
10 Apr 2012 Christoph david

Thank you very much! You were right. I created a cell array and now it works.

I apologize for the rate.
This was my first post on mathworks. When I clicked the "submit" button nothing happend so I thought I have to rate. Without thinking (and without reading) I rated 4 stars. Than I realised that I just had to reload the page to see my post.
Sorry for that.

Thank you for this tool!

10 Apr 2012 Oliver Woodford

Christoph: This an issue with your use of MATLAB syntax, rather than anything else. Make a cell array, string1, of the input file names, then call
append_pdfs('output.pdf', string1{:});
It's not clear why gave the function 4 stars. Any suggestions?

10 Apr 2012 Christoph david

It works when I write output, input1, input2 inside '' with .pdf extensions <== true.
+ I can't make it work if I stock all inputs during a loop in a string (the string includes the apostrophes and commas)
e.g. string1='input1','input2'
append_pdfs('output',string1) doesn't work.
Anyone an idea how to make it work?
Thx a lot!

03 Apr 2012 Hakan Çakan

Oliver,
Thank you very much. I solved it but in the help section it is written that:

% Example:
% append_pdfs(output, input1, input2, ...)

It works when I write output, input1, input2 inside '' with .pdf extensions. It would be beter if you update help file accordingly.

Thanks again.

05 May 2011 Oliver Woodford

Michael: Fix submitted. Thanks for reporting the problem.

04 May 2011 Michael Teo

I was trying to appends 200+pdfs to 1 pdf. It resulted in "The command line is too long." message.

Pls advise, thanks.

04 May 2011 Oliver Woodford

Thanks, David. It'll be in the next version.

28 Apr 2011 David Chorlian

Regarding ghostscript.m, in Linux /usr/bin/gs is the more likely path for gs.

Updates
28 Apr 2011

Bug fix to ghostscript.m mostly affecting Linux (thanks to Paul Durack for reporting it).

05 May 2011

Fixed bug affecting long commands. Thanks to Michael Teo for reporting it.

01 Jun 2011

Improve quality of bitmaps. Thanks to Martin Wittmann for pointing out the issue.

10 Apr 2012

Added more syntax examples.

Contact us