diff -urN TeX.orig/texk/web2c/pdfetexdir/NEWS TeX/texk/web2c/pdfetexdir/NEWS --- TeX.orig/texk/web2c/pdfetexdir/NEWS 2006-06-03 10:15:46.000000000 +0200 +++ TeX/texk/web2c/pdfetexdir/NEWS 2006-06-03 11:48:52.000000000 +0200 @@ -1,4 +1,16 @@ ------------------------------------------------- +pdfTeX 3.141592-1.30.6 was released on 2006-02-16 +------------------------------------------------- +- bugfix: updated xpdf to 3.01pl2 + +------------------------------------------------- +pdfTeX 3.141592-1.30.5 was released on 2005-12-04 +------------------------------------------------- +- bugfix: \pdfximage prints the file name twice (bug 441) +- bugfix: buffer overflow with \pdfmatch (bug 444) +- bugfix: updated xpdf to 3.01pl1 + +------------------------------------------------- pdfTeX 3.141592-1.30.4 was released on 2005-10-17 ------------------------------------------------- - bugfix: whitespaces in filenames didn't work on Unix anymore (bug 377) @@ -396,5 +408,5 @@ pdfTeX 3.14159-1.00a-pretest-20010804 was released on 2001-08-04 ---------------------------------------------------------------- -$Id: //depot/Build/source.development/TeX/texk/web2c/pdftexdir/NEWS#88 $ +$Id: //depot/Build/source.development/TeX/texk/web2c/pdftexdir/NEWS#86 $ // vim: tw=79:ts=2:expandtab:autoindent diff -urN TeX.orig/texk/web2c/pdfetexdir/README TeX/texk/web2c/pdfetexdir/README --- TeX.orig/texk/web2c/pdfetexdir/README 2006-06-03 10:15:46.000000000 +0200 +++ TeX/texk/web2c/pdfetexdir/README 2006-06-03 11:48:52.000000000 +0200 @@ -1,10 +1,10 @@ pdfTeX ====== -README for version 3.14159-1.30.4 of $Date: 2005/10/17 $ +README for version 3.14159-1.30.6 of $Date: 2005/08/23 $ ======================================================== -This directory contains the version 1.30.4 of pdfTeX, an extended version of +This directory contains the version 1.30.6 of pdfTeX, an extended version of TeX that can create PDF directly from TeX source files and enhance the result of TeX typesetting with the help of PDF. When PDF output is not selected, pdfTeX produces normal DVI output, otherwise it produces PDF @@ -36,7 +36,7 @@ LEGAL ISSUES ============ -pdfTeX is copyright (c) 1996-2005 Han The Thanh, +pdfTeX is copyright (c) 1996-2006 Han The Thanh, pdfTeX is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -86,5 +86,5 @@ Please send bug reports, offers of help, etc. to martin@pdftex.org -$Id: //depot/Build/source.development/TeX/texk/web2c/pdftexdir/README#33 $ +$Id: //depot/Build/source.development/TeX/texk/web2c/pdftexdir/README#30 $ // vim: tw=75 diff -urN TeX.orig/texk/web2c/pdftexdir/NEWS TeX/texk/web2c/pdftexdir/NEWS --- TeX.orig/texk/web2c/pdftexdir/NEWS 2006-06-03 10:15:46.000000000 +0200 +++ TeX/texk/web2c/pdftexdir/NEWS 2006-06-03 11:48:52.000000000 +0200 @@ -1,4 +1,16 @@ ------------------------------------------------- +pdfTeX 3.141592-1.30.6 was released on 2006-02-16 +------------------------------------------------- +- bugfix: updated xpdf to 3.01pl2 + +------------------------------------------------- +pdfTeX 3.141592-1.30.5 was released on 2005-12-04 +------------------------------------------------- +- bugfix: \pdfximage prints the file name twice (bug 441) +- bugfix: buffer overflow with \pdfmatch (bug 444) +- bugfix: updated xpdf to 3.01pl1 + +------------------------------------------------- pdfTeX 3.141592-1.30.4 was released on 2005-10-17 ------------------------------------------------- - bugfix: whitespaces in filenames didn't work on Unix anymore (bug 377) @@ -396,5 +408,5 @@ pdfTeX 3.14159-1.00a-pretest-20010804 was released on 2001-08-04 ---------------------------------------------------------------- -$Id: //depot/Build/source.development/TeX/texk/web2c/pdftexdir/NEWS#88 $ +$Id: //depot/Build/source.development/TeX/texk/web2c/pdftexdir/NEWS#86 $ // vim: tw=79:ts=2:expandtab:autoindent diff -urN TeX.orig/texk/web2c/pdftexdir/pdftex.ch TeX/texk/web2c/pdftexdir/pdftex.ch --- TeX.orig/texk/web2c/pdftexdir/pdftex.ch 2006-06-03 10:15:46.000000000 +0200 +++ TeX/texk/web2c/pdftexdir/pdftex.ch 2006-06-03 11:48:52.000000000 +0200 @@ -44,7 +44,7 @@ % along with pdfTeX; if not, write to the Free Software % Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA % -% $Id: //depot/Build/source.development/TeX/texk/web2c/pdftexdir/pdftex.ch#171 $ +% $Id: //depot/Build/source.development/TeX/texk/web2c/pdftexdir/pdftex.ch#169 $ % % The TeX program is copyright (C) 1982 by D. E. Knuth. % TeX is a trademark of the American Mathematical Society. @@ -68,8 +68,8 @@ @d banner=='This is TeX, Version 3.141592' {printed when \TeX\ starts} @y @d pdftex_version==130 { \.{\\pdftexversion} } -@d pdftex_revision=="4" { \.{\\pdftexrevision} } -@d pdftex_version_string=='-1.30.4' {current \pdfTeX\ version} +@d pdftex_revision=="6" { \.{\\pdftexrevision} } +@d pdftex_version_string=='-1.30.6' {current \pdfTeX\ version} @# @d pdfTeX_banner=='This is pdfTeX, Version 3.141592',pdftex_version_string {printed when \pdfTeX\ starts} diff -urN TeX.orig/texk/web2c/pdftexdir/pdftosrc.1 TeX/texk/web2c/pdftexdir/pdftosrc.1 --- TeX.orig/texk/web2c/pdftexdir/pdftosrc.1 1970-01-01 01:00:00.000000000 +0100 +++ TeX/texk/web2c/pdftexdir/pdftosrc.1 2006-06-03 11:48:52.000000000 +0200 @@ -0,0 +1,219 @@ +.\" Process this file with +.\" groff -man -Tascii pdftosrc.1 +.\" +.\" $Id: pdftosrc.1,v 1.3 2005/11/04 18:55:24 hhenkel Exp $ +.\" +.TH pdftosrc 1 "3 November 2005" "User Manuals" +.SH NAME +pdftosrc \- extract source file or stream from PDF file +.SH SYNOPSIS +.B pdftosrc +.I PDF-file +.R [ +.I stream-object-number +.R ] +.SH DESCRIPTION +If only +.I PDF-file +is given as argument, +.B pdftosrc +extracts the embedded source file +from the first found stream object +with /Type /SourceFile within the +.I PDF-file +and writes it to a file with the name /SourceName +as defined in that PDF stream object +(see application example below). + +If both +.I PDF-file +and +.I stream-object-number +are given as arguments, +.B pdftosrc +extracts and uncompresses the PDF stream of the object +given by its +.I stream-object-number +from the +.I PDF-file +and writes it to a file named +.IR PDF-file . stream-object-number +with the ending +.I .pdf +or +.I .PDF +stripped from the original +.I PDF-file +name. + +In either case +an existing file with the output file name will be overwritten. +.SH OPTIONS +None. +.SH FILES +Just the executable +.BR pdftosrc . +.SH ENVIRONMENT +None. +.SH DIAGNOSTICS +At success the exit code of +.B pdftosrc +is 0, else 1. + +All messages go to stderr. +At program invocation, +.B pdftosrc +issues the current version number of the program +.BR xpdf , +on which +.B pdftosrc +is based: + +.RS +pdftosrc version 3.00 + +.RE +When +.B pdftosrc +was successful with the output file writing, +one of the following messages will be issued: + +.RS +Source file extracted to +.I source-file-name + +.RE +or + +.RS +Stream object extracted to +.IR PDF-file . stream-object-number + +.RE + +.RE +When the object given by the +.I stream-object-number +does not contain a stream, +.B pdftosrc +issues the following error message: + +.RS +Not a Stream object + +.RE +When the +.I PDF-file +can't be opened, the error message is: + +.RS +Error: Couldn't open file +.RI ' PDF-file '. + +.RE +When +.B pdftosrc +encounters an invalid PDF file, +the error message (several lines) is: + +.RS +Error: May not be a PDF file (continuing anyway) +.RE +.RS +(more lines) +.RE +.RS +Invalid PDF file + +.RE +There are also more error messages from +.B pdftosrc +for various kinds of broken PDF files. +.SH NOTES +An embedded source file will be written out unchanged, +i. e. it will not be uncompressed in this process. + +Only the stream of the object will be written, +i. e. not the dictionary of that object. + +Knowing which +.I stream-object-number +to query requires information about the PDF file +that has to be gained elsewhere, +e. g. by looking into the PDF file with an editor. + +The stream extraction capabilities of +.B pdftosrc +(e. g. regarding understood PDF versions and filter types) +follow the capabilities of the underlying +.B xpdf +program version. + +Currently the generation number of the stream object +is not supported. +The default value 0 (zero) is taken. + +The wording +.I stream-object-number +has nothing to do with the `object streams' introduced +by the Adobe PDF Reference, +5th edition, version 1.6. +.SH EXAMPLES +When using pdftex or pdfetex, +a source file can be embedded into some +.I PDF-file +by using pdftex primitives, +as illustrated by the following example: + +\\immediate\\pdfobj +.RE + stream attr {/Type /SourceFile /SourceName (myfile.zip)} +.RS +.RE + file{myfile.zip} +.RS +.RE +\\pdfcatalog{/SourceObject \\the\\pdflastobj\\space 0 R} + +Then this zip file can be extracted from the +.I PDF-file +by calling +.B pdftosrc +.IR PDF-file . +.SH BUGS +Not all embedded source files will be extracted, +only the first found one. + +Email bug reports to +.B pdftex@tug.org. +.SH SEE ALSO +.BR xpdf (1), +.BR pdfimages (1), +.BR pdftotext (1), +.BR pdftex (1), +.BR pdfetex (1). +.SH AUTHORS +.B pdftosrc +written by Han The Thanh, using +.B xpdf +functionality from Derek Noonburg. + +Man page written by Hartmut Henkel. +.SH COPYRIGHT +Copyright (c) 1996-2002 Han The Thanh, + +This file is part of pdfTeX. + +pdfTeX is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +pdfTeX is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with pdfTeX; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA diff -urN TeX.orig/texk/web2c/pdftexdir/README TeX/texk/web2c/pdftexdir/README --- TeX.orig/texk/web2c/pdftexdir/README 2006-06-03 10:15:46.000000000 +0200 +++ TeX/texk/web2c/pdftexdir/README 2006-06-03 11:48:52.000000000 +0200 @@ -1,10 +1,10 @@ pdfTeX ====== -README for version 3.14159-1.30.4 of $Date: 2005/10/17 $ +README for version 3.14159-1.30.6 of $Date: 2005/08/23 $ ======================================================== -This directory contains the version 1.30.4 of pdfTeX, an extended version of +This directory contains the version 1.30.6 of pdfTeX, an extended version of TeX that can create PDF directly from TeX source files and enhance the result of TeX typesetting with the help of PDF. When PDF output is not selected, pdfTeX produces normal DVI output, otherwise it produces PDF @@ -36,7 +36,7 @@ LEGAL ISSUES ============ -pdfTeX is copyright (c) 1996-2005 Han The Thanh, +pdfTeX is copyright (c) 1996-2006 Han The Thanh, pdfTeX is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -86,5 +86,5 @@ Please send bug reports, offers of help, etc. to martin@pdftex.org -$Id: //depot/Build/source.development/TeX/texk/web2c/pdftexdir/README#33 $ +$Id: //depot/Build/source.development/TeX/texk/web2c/pdftexdir/README#30 $ // vim: tw=75 diff -urN TeX.orig/texk/web2c/pdftexdir/utils.c TeX/texk/web2c/pdftexdir/utils.c --- TeX.orig/texk/web2c/pdftexdir/utils.c 2006-06-03 10:15:46.000000000 +0200 +++ TeX/texk/web2c/pdftexdir/utils.c 2006-06-03 11:48:52.000000000 +0200 @@ -17,7 +17,7 @@ along with pdfTeX; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -$Id: //depot/Build/source.development/TeX/texk/web2c/pdftexdir/utils.c#25 $ +$Id: //depot/Build/source.development/TeX/texk/web2c/pdftexdir/utils.c#24 $ */ #include "sys/types.h" @@ -32,7 +32,7 @@ #include static const char perforce_id[] = - "$Id: //depot/Build/source.development/TeX/texk/web2c/pdftexdir/utils.c#25 $"; + "$Id: //depot/Build/source.development/TeX/texk/web2c/pdftexdir/utils.c#24 $"; char *cur_file_name = NULL; strnumber last_tex_string; @@ -235,10 +235,25 @@ char *makecstring(integer s) { - static char cstrbuf[MAX_CSTRING_LEN]; - char *p = cstrbuf; - int i, l = strstart[s + 1] - strstart[s]; + static char *cstrbuf = NULL; + char *p; + static int allocsize; + int allocgrow, i, l = strstart[s + 1] - strstart[s]; check_buf(l + 1, MAX_CSTRING_LEN); + if (cstrbuf == NULL) { + allocsize = l + 1; + cstrbuf = xmallocarray(char, allocsize); + } else if (l + 1 > allocsize) { + allocgrow = allocsize * 0.2; + if (l + 1 - allocgrow > allocsize) + allocsize = l + 1; + else if (allocsize < MAX_CSTRING_LEN - allocgrow) + allocsize += allocgrow; + else + allocsize = MAX_CSTRING_LEN; + cstrbuf = xreallocarray(cstrbuf, char, allocsize); + } + p = cstrbuf; for (i = 0; i < l; i++) *p++ = strpool[i + strstart[s]]; *p = 0; @@ -1112,6 +1127,8 @@ input/ouput same as makecstring: input: string number output: C string with quotes removed. + That means, file names that are legal on some operation systems + cannot any more be used since pdfTeX version 1.30.4. */ char *makecfilename(strnumber s) { char *name = makecstring(s); @@ -1124,6 +1141,5 @@ p++; } *q = '\0'; - fprintf(stderr, " %s\n", name); return name; } diff -urN TeX.orig/texk/web2c/pdftexdir/writeimg.c TeX/texk/web2c/pdftexdir/writeimg.c --- TeX.orig/texk/web2c/pdftexdir/writeimg.c 2006-06-03 10:15:46.000000000 +0200 +++ TeX/texk/web2c/pdftexdir/writeimg.c 2006-06-03 11:48:52.000000000 +0200 @@ -17,7 +17,7 @@ along with pdfTeX; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -$Id: //depot/Build/source.development/TeX/texk/web2c/pdftexdir/writeimg.c#18 $ +$Id: //depot/Build/source.development/TeX/texk/web2c/pdftexdir/writeimg.c#17 $ */ #include "ptexlib.h" @@ -26,7 +26,7 @@ #include static const char perforce_id[] = - "$Id: //depot/Build/source.development/TeX/texk/web2c/pdftexdir/writeimg.c#18 $"; + "$Id: //depot/Build/source.development/TeX/texk/web2c/pdftexdir/writeimg.c#17 $"; #define bp2int(p) round(p*(onehundredbp/100.0))