Code covered by the BSD License  

Highlights from
pdfapp: a pedestrian pdf concatenator

2.0

2.0 | 1 rating Rate this file 5 Downloads (last 30 days) File Size: 3.18 KB File ID: #26545

pdfapp: a pedestrian pdf concatenator

by

 

31 Jan 2010 (Updated )

PDFAPP appends PDF files to a new PDF file

| Watch this File

File Information
Description

PDFAPP concatenates existing PDF files into
one PDF file using a user installed version
of GHOSTSCRIPT (GS).
in essence, it creates an input file @INPUT
for the GS application and runs it by a
call to SYSTEM().

see
> help pdfapp
for usage and a brief example for this small utility

MATLAB release MATLAB 7 (R14)
Other requirements tested with the latest ghostscript version 8.64 available from http://pages.cs.wisc.edu/~ghost/index.htm
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (2)
21 Jun 2010 us

thanks for your comments, mark

so far, we never ran into this problem...

a few thoughts
1) PDFAPP only creates the input to GHOSTSCRIPT and nothing else; in particular, it does not open/change/etc the PDF files...
2) hence, it all depends on how your GS version is handling your PDFs, which might be in a compressed format (just a guess)...

here's an example, which shows a reasonably sized output

surf(peaks(64));
print -dpdf -r600 ex_01.pdf;
print -dpdf -r600 ex_02.pdf;
pdfapp foo ex_01.pdf ex_02.pdf;
%{
PDFAPP> F:\usr\matlab\TMP\fex\ags\test\foo.pdf
1 > F:\usr\matlab\TMP\fex\ags\test\ex_01.pdf
2 > F:\usr\matlab\TMP\fex\ags\test\ex_02.pdf
PDFAPP> F:\usr\matlab\TMP\fex\ags\test\foo.pdf [260 kb]
%}
ls -latr *.pdf
%{
-rw---a 133978 6-21-2010 9:42p ex_01.pdf
-rw---a 133978 6-21-2010 9:42p ex_02.pdf
-rw---a 266557 6-21-2010 9:43p foo.pdf
%}
d=dir('ex_*.pdf');
ds=sum([d.bytes])
% ds = 267956
% thus, in this case, the output is even slightly smaller...

us

21 Jun 2010 Mark

I had an old version of GhostScript which didn't work with this program. I downloaded and installed the latest version, and it ran fine, but it appended 11 files totalling 1.26MB into a single 17MB output -- a expansion of 13 times!

Updates
16 Mar 2010

added one more error check; version tag 16-Mar-2010 19:45:32

Contact us