Permalink
Switch branches/tags
Nothing to show
Commits on Jun 18, 2011
  1. Run this example with a demo pdf file of 50 pages. The first block wh…

    Averell7 committed Jun 18, 2011
    …ich uses mergePage takes an average of 30 seconds to run. The second block which uses mergePage3 takes an average of 0.4 seconds
  2. mergePage3 and related functions added for faster merging.

    Averell7 committed Jun 18, 2011
    Bug fix in _getData
    Improvements in createBlankPage and mergeResources
Commits on Jul 18, 2010
Commits on Feb 23, 2010
Commits on Oct 21, 2009
  1. Do not change pages given to PageObject.mergeTransformedPage

    mfenniak committed Oct 21, 2009
    When using PageObject.mergeTransformedPage(self, page2), the
    transformation matrix was directly applied by changing the content
    stream in page2. As a result, if page2 was used afterward, it was
    modified by the previously given transformation matrix.
    
    To fix this, we now modify the content stream from page2 immediately
    before merging it, by supplying a transformation as an argument of
    a new PageObject._mergePage private method.
    
    Patch by Kjo Hansi Glaz
Commits on Oct 15, 2009
  1. Support adding blank pages

    mfenniak committed Oct 15, 2009
    Add methods to create blank pages, either by invoking the static method
    createBlankPage on PageObject or by invoking addBlankPage or
    insertBlankPage on PdfFileWriter.
    
    Define a new PageSizeNotDefinedError, and a PyPdfError as a superclass for
    all Exceptions raised by pyPdf. As a result, PdfReadError now extends
    PyPdfError.
    
    Patch from Kjo Hansi Glaz <kjo@a4nancy.net.eu.org>
  2. Add a method to insert pages to PdfFileWriter

    mfenniak committed Oct 15, 2009
    The new insertPage method inserts a page at a given position.
    
    Patch from Kjo Hansi Glaz <kjo@a4nancy.net.eu.org>
  3. Support page resizing

    mfenniak committed Oct 15, 2009
    Add to PageObject methods to resize a page.
    
    Patch from Kjo Hansi Glaz <kjo@a4nancy.net.eu.org>
  4. Add content resizing while merging page

    mfenniak committed Oct 15, 2009
    Add to pageObject methods to merge a transformed page. These methods are
    similar to mergePage, but a transformation matrix is applied to the merged
    page.
    
    It is possible to give the transformation matrix by hand (cf. § 8.3.3
    "Common Transformations" of the PDF reference), using mergeTransformedPage,
    but helper methods also provide common operations such as scaling,
    resizing, translating and some of their combinaisons.
    
    An use case for these methode is to put two A4 portrait pages reduced to
    A5 on an A4 landscape page. This is the important feature that was missing
    to be able to create booklets with pyPdf.
    
    Patch from Kjo Hansi Glaz <kjo@a4nancy.net.eu.org>
  5. Add _addTransformationMatrix static method

    mfenniak committed Oct 15, 2009
    PageObject._addTransformationMatrix adds a "cm" operator at the beginning of
    a contents stream.
    
    This is needed to implement content resizing.
    
    Transformation matrices are defined in § 8.3.3 "Common Transformations" of
    the PDF reference.
    
    Patch from Kjo Hansi Glaz <kjo@a4nancy.net.eu.org>
  6. Conform to spec. when writing floats

    mfenniak committed Oct 15, 2009
    FloatObject.writeToStream could output "1.1 E-1", but the PDF specification
    §7.3.3 "Numeric Objects" doesn't allow exponential notation. We now conforms
    to the specification by manually outputing:
    * fractional numbers with 5 digits precision;
    * integers without exponent.
    
    The output stream now tends to include useless extraneous zeros, but a few
    extra bytes are still better than writing unparsable PDFs.
    
    Patch from Kjo Hansi Glaz <kjo@a4nancy.net.eu.org>
  7. Also handle "/Properties" while merging streams

    mfenniak committed Oct 15, 2009
    PDF Reference § 7.8.3, table 33 and § 14.6.2 mention that
    "/Properties" ressource can appear in "/Ressources".
    
    Patch from Kjo Hansi Glaz <kjo@a4nancy.net.eu.org>
  8. Fixed crash when pages have no "/Contents"

    mfenniak committed Oct 15, 2009
    PDF Reference § 7.7.3.3 says that "/Contents" is optional, but pyPdf
    assumed its presence.
    
    Add PageObject.getContents that returns either the "/Contents" object or
    None, and use it and test its result in every places where "/Contents" is
    used.
    
    Patch from Kjo Hansi Glaz <kjo@a4nancy.net.eu.org>
  9. Specified UTF-8 as encoding pdf.py

    mfenniak committed Oct 15, 2009
    Patch from Kjo Hansi Glaz <kjo@a4nancy.net.eu.org>
  10. Fix parsing of octal encoded characters

    mfenniak committed Oct 15, 2009
    When parsing a string, octal encoded characters were always considered as
    described by 3 chars. However, the PDF specification says :
    
      The number ddd may consist of one, two, or three octal digits;
      high-order overflow shall be ignored. Three octal digits shall be
      used, with leading zeros as needed, if the next character of the
      string is also a digit.
    
    readStringFromStream now conforms with the specification.
    
    Patch from Kjo Hansi Glaz <kjo@a4nancy.net.eu.org>
  11. Preservice indirect objects when merging page

    unknown committed Oct 15, 2009
    When merging pages using PageObject.mergePage, IndirectObjects were copied
    resulting in duplicated objects in the ressource dictionnary. For some
    usages this lead to major size increasement of the written PDF.
    
    So we don't resolve indirect references in PageObject._mergeRessources
    anymore.
    
    Patch from Kjo Hansi Glaz <kjo@a4nancy.net.eu.org>
  12. .hgignore -> .gitignore

    unknown committed Oct 15, 2009
Commits on Jan 11, 2009
  1. fix typo, patch from Ralf Schlatterbeck.

    mfenniak@stewart.fenniak.net committed Jan 11, 2009
Commits on Sep 2, 2008
  1. Added tag v1.12 for changeset dfbefd98ee46

    mfenniak@stewart.local committed Sep 2, 2008
  2. finish docs for 1.12

    mfenniak@stewart.local committed Sep 2, 2008
  3. add LICENSE

    mfenniak@stewart.local committed Sep 2, 2008
  4. fix reading of operators from content streams -- remove maxchars=2 an…

    mfenniak@stewart.local committed Sep 2, 2008
    …d intelligently look for the end of the operator
Commits on Aug 14, 2008
  1. add to changelog

    mfenniak@stewart.local committed Aug 14, 2008
  2. vers

    mfenniak@stewart.local committed Aug 14, 2008
Commits on Aug 12, 2008
  1. Added tag v1.12-prerelease-B for changeset c45c2d2c8f57

    mfenniak@stewart.local committed Aug 12, 2008
  2. vers

    mfenniak@stewart.local committed Aug 12, 2008
Commits on Aug 11, 2008
  1. merge

    mfenniak@stewart.local committed Aug 11, 2008
  2. attempt to read XMP metadata from encrypted files

    mfenniak@stewart.local committed Aug 11, 2008