Rand Stats

PDF

zef:dwarring
0.6.8  2024-09-29T06:30:31+13:00
    - Create a compilation unit for X::PDF exceptions

0.6.7  2024-07-30T14:47:27+12:00
    - Fix inline-image test in t/write-ast.t

0.6.6  2024-07-23T05:02:13+12:00
    - Improvements to stream parsing and validation
    - Revised AST and writing for inline images.

0.6.5  2024-07-12T08:01:54+12:00
    - Utilise PDF::Native::COS, where available, in PDF::IO::Reader
      for faster loader and copying of larger PDF files. This can give a
      2 - 3x increase in performance.

0.6.4  2024-06-26T15:40:09+12:00
    - Change PDF::IO from a class to a role so that is can be applied to
      PDF::IO::Blob. Some general tidying of PDF::IO coercements.

0.6.3  2024-01-30T15:01:34+13:00
    - Fix some array/hash dispatch failures in Rakudo 2024.01. E.g.:
      https://github.com/pdf-raku/PDF-raku/actions/runs/7509248357/job/20998615029

0.6.2  2024-01-13T14:09:09+13:00
    - Change header version from '%PDF-1.3' to '%PDF-1.4'. This module,
      and the wider PDF tool-chain, implement a number of PDF 1.4 features.
      See https://en.wikipedia.org/wiki/History_of_PDF.

0.6.1  2023-11-01T06:18:06+13:00
    - Add read support for PDF 2.0 UTF-8 encoded text strings
    - Fix pdf-rewriter.raku --render when input pages are an array
      of content streams.

0.6.0  2023-08-20T11:54:07+12:00
    - Fix #37 some text values not being encrypted. Also fix logic
      around bypassing encryption dictionary.

0.5.19  2023-08-04T16:09:25+12:00
    - Fix xref loading via PDF::Native to allow whitespace between
      xref and trailer.

0.5.18  2023-05-24T08:53:23+12:00
    - Rework invalid test in t/cos-tie-entry.t, which was failing on
      Rakudo blead

0.5.17  2023-05-18T07:16:56+12:00
    - Increase indirect object parse window by 1 byte.
      fixes: https://github.com/pdf-raku/PDF-Class-raku/issues/22

0.5.16  2023-02-21T05:46:04+13:00
    - Add :$file option to new(). Implicitly opens a PDF

0.5.15  2023-01-25T06:41:44+13:00
    - Handle and throw on IO.open failures

0.5.14  2023-01-19T14:59:45+13:00
   - Suppress warning from PDF::COS::Coercer. See
     https://github.com/pdf-raku/PDF-Class-raku/issues/21

0.5.13  2022-12-11T09:21:41+13:00
   - make pdf-rewriter.raku --render option only uncompress page content
   - refactor of PDF::COS::Tie multi-methods. Added !tie-container() private
     method for Hash/Dict coercement.

0.5.12  2022-07-27T05:13:06+12:00
   - Ensure cross reference entries are sorted by object number #35

0.5.11  2022-07-04T15:46:11+12:00
   - Fix locking for consistency in PDF::COS::Util ast_coerce()

0.5.10  2022-07-04T12:46:14+12:00
   - Fix pdf-checker.raku for PDF 0.5.8+
   - Add PDF::COS::Dict required-entries() and aliases method
   - Deprecate Hash slow-path in PDF::IO::Writer
   - Fix regression in Pod::To::PDF t/render-pdf-test-sheets.t

0.5.9  2022-06-09T08:20:15+12:00
   - Fix writing of Any as 'null'

0.5.8  2022-06-07T16:19:57+12:00
   - Use PDF::Grammar v0.2.9+ :lite mode for lighter AST's.
   - Numeric objects are no longer cast to roles PDF::COS::Int,
     PDF::COS::Bool, PDF::COS::Real unless they are indirect
     objects.
   - Utilize PDF::Native v0.0.2+ cross reference stream
     unpack-xref-stream() and pack-xref-stream() subroutines.
   - Add --compat option to pdf-rewriter.raku script.

0.5.7  2022-06-02T06:26:44+12:00
   - Upgrade from 32 to 64 bit indexing in cross reference streams
     to support opening very large PDF 1.5+ (> 3.2Gb) files.
   - Added compatibility and automatic loading of PDF::Native. Soon
     to be released optional performance enhancement module.

0.5.6  2022-05-21T09:43:39+12:00
   - More thread protection for array/hash construction

0.5.5  2022-05-19T12:58:40+12:00
   - Fix possible memory leaks in PDF object construction

0.5.4  2022-05-12T13:37:30+12:00
   - Fix a thread-safety issue in PDF::COS::Util ast-coerce() sub.

0.5.3  2022-05-12T07:59:14+12:00
   - Fix a thread-safety issue in PDF::COS::Tie tie() method.

0.5.2  2022-05-11T12:58:16+12:00
   - Partially back-out PDF::COS required() method to fix PDF::Class
     regressions from 0.5.0 release.

0.5.1  2022-05-07T09:32:57+12:00
   - Further lock-protection of dynamically 'require'd classes
     for thread safety

0.5.0  2022-05-06T13:19:02+12:00
   - Improved thread safety of reading and fetching objects.
     -- Protect PDF::COS loader() method
     -- Protect Reader ind-obj method to allow concurrent fetching
     -- Better scoping of %seen + general refactor in PDF::COS::{Dict|Array}
     -- Some locking and deprecations in PDF::COS::Loader
     -- Added test t/threads.t
     This round of changes targets concurrent PDF reading only!

0.4.25  2022-03-31T16:42:09+13:00
   - Replace role() method with induce(). Only mixin punned roles.

0.4.24  2022-03-26T07:41:03+13:00
   - Further fixes to latin-1 in ByteString coercements

0.4.23  2022-03-13T17:25:53+13:00
   - Ensure strings are latin-1 in ByteString coercements
   - Simplify date string coercements
   - Add X::PDF::NoTrailer error

0.4.22  2022-03-13T17:07:05+13:00
   - Initial CPAN -> zef release

0.4.22  2022-02-24T13:21:35+13:00
   - Replace role-model() method with role()

0.4.21  2022-02-23T14:06:44+13:00
   - Attempted fix of flapping error in PDF::COS::Tie role-model() method

0.4.20  2022-02-06T11:53:46+13:00
  - Fix PDF::IO::Filter::RunLength for pending Rakudo 2022.02; niner++

0.4.19  2022-01-12T06:47:11+13:00
  - Refactor Array coercements for consistency with Dict and Stream
  - Fixed PDF::IO::Writer name serialization to encode '#' as #23 (not ##)
  - Fixed some test fails from git checkout on Windows #31 

0.4.18  2022-01-01T07:42:10+13:00
  - PDF::COS::Bool now does the PDF::COS role
  - Fixed PDFDoc encoding by regenerating from PDF::ISO_32000 resource:
    Table_D2-PDFDocEncoding_Character_Set.json
  - Fixed PDF::COS::TextString to handle non-byte strings (e.g. /ActualText
    in content streams).
  - Improvements to PDF::COS::TextString utf16-be encoding

0.4.17  2021-09-29T14:46:25+13:00
  - Refix PDF::COS::DateTime.new

0.4.16  2021-09-28T09:21:51+13:00
  - Fix to PDF::COS::DateTime.new

0.4.15  2021-07-29T12:43:43+12:00
  - Add error check for zero cross reference offset
  - Change Bufs to Blobs in PDF::IO::Util :&pack and
    PDF::IO::Filter::Predictors
  - Fix overflow error in LZW decode filter #30

0.4.14  2021-07-02T13:14:48+12:00
  - Refix PDF without file associations

0.4.13  2021-07-02T12:07:07+12:00
  - Fix PDF::IO coercement of Blobs
  - Ensure a PDF works without file associations. E.g. when rebuilt from:
    $pdf .= open: $pdf.Blob;

0.4.12  2021-06-24T11:43:44+12:00
  - Add COERCE method to PDF::IO::Blob, PDF::IO::Handle, PDF::IO:Str

0.4.11  2021-04-28T12:41:23+12:00
  - Fix writing of enumerated names #29

0.4.10  2021-04-20T06:27:30+12:00
  - Add --stream option to pdf-rewriter.raku and PDF::IO::Reader
  - Default to :!stream in save-as() method.

0.4.9  2021-04-19T06:37:06+12:00
  - Add PDF::IO::Writer stream-cos() and stream-body() methods for chunked
    saving to a file-handle. Apply to PDF save-as() and update() methods.

0.4.8  2021-04-15T07:09:03+12:00
  - Enum agnostic array access for latest Rakudo. See
    https://github.com/rakudo/rakudo/issues/4310

0.4.7  2021-04-14T06:19:49+12:00
  - Tweak AST construction for latest Rakudo

0.4.6  2021-04-12T12:39:56+12:00
  - Use Hash::int for PDF::IO::Reader %!ind-obj-idx (indirect
    object index).
  - Add $pdf.id rw accessor. In particular, this allows assignment of
    consistent IDs for the benefit of PDF tool-chain testing.

0.4.5  2021-01-12T06:00:31+13:00
  - Rename classes PDF::Writer -> PDF::IO::Writer and PDF::Reader
    -> PDF::IO::Reader. Free up PDF::Reader and PDF::Writer for
    Raku ecosystem usage.

Release 0.4.4
- Add COERCE methods to COS roles and classes. For example:
      my PDF::COS::TextString $s .= COERCE: 'Hi';
  or using Rakudo 2020.11+ coercion semantics:
      my PDF::COS::TextString() $s = 'Hi';

Release 0.4.3
- [PDF::Reader] add abstract base exception class X::PDF apply to existing
  X::PDF::* exception classes
- [pdf-rewriter.raku]
  -- added --render option to render and reformat pages.  This option also requires
     an upstream module such as PDF::Lite or PDF::Class.
  -- Hide back trace for handled errors (type X::PDF)
- [PDF::COS::TextString] Decode as UTF16-BE / PDFDoc when input is a byte-string #26
- [PDF::COS::Util] rename  pack-pp() -> pack-be() [big endian]

Release 0.4.2
- Streamlined cross-reference loading; adjust to PDF::Grammar 0.2.1
- Fix 'missing required field(s)' message on a tied COS attribute.
- Fix accidental coercement of byte to name strings; also date coercements
- Fix syntax level PDF/A non-conformance issues, as reported by verapdf:
  -- follow 'obj' by \n (not space) when serialising indirect objects
  -- have 4 binary characters (not 3) in header comment

Release 0.4.1
- [PDF::Writer] Compacted writing of smaller dictionaries
- [PDF] .save-as() method: don't copy when updating and source and destination are the same

Release 0.4.0
- Rename modules *.pm -> *.rakumod and scripts *.p6 -> *.raku

Release 0.3.8
- [PDF::Writer] - Fixed .write-content() method to sanitise any non-latin
  unicode chars in comment strings, which otherwise breaks serialization.
  Choosing to map them to #Xxx where Xxx is a hexadecimal number
- [PDF] Add $.open(:type) option. Asserts that the PDF file is of a given type 'PDF', 'FDF' etc.
- [pdf-rewriter.p6] --class option changed from a Boolean to a string. Any class
  can now be loaded that is based on PDF (PDF::Lite, PDF::Class, PDF::API6).
- [PDF::COS::Tie][PDF::COS::Tie::Array][PDF::COS::Tie::Hash]
  Some internal renaming of attribute roles and methods. TiedHash -> COSDictAttrHOW,
  TiedArray -> COSArrayAttrHOW, $attr.tied -> $attr.cos

Release 0.3.7
- [PDF::COS::Type::XRef]
  -- Fixed a bug in decode-index() method.
- [PDF::Reader]
  -- Reworked !load-index method
- [PDF::COS]
  -- Improved required() method.

Release 0.3.6
- [PDF::Writer]
   -- Fix for issue#22 Incremental updates breaking Adobe
      Reader. Incremental updates to a 1.5+ PDF that has
      cross reference streams are now written with cross
      reference streams.

Release 0.3.5
- [PDF]
  -- Add top-level .cb-finish() hook. Call just prior to
     serialization

Release 0.3.4
- [PDF::Reader][PDF::Writer]
  -- Allow copying of raw object ASTs from input to output
     PDFs. To reduce memory usage in full-save mode. Speeds up
     saving of encrypted PDFs.
  -- Fixed /Prev trailer entry in incremental save
  -- Fixed pdf-rewriter.p6 --decrypt option
- [PDF::Reader]
  -- Respect EncryptMetadata flag in existing PDF files.
     Disallow for newly created PDF files.
  -- Fixed handling of encryption dictionaries when they're
     not an indirect object
  -- Improved loading of cross reference index
- [PDF]
  -- Allow reencryption of an already encrypted PDF.
  -- Disallow update of a newly encrypted or re-encrypted PDF
- [pdf-rewriter.p6]
  -- added owner-check and -drm option.

Release 0.3.3
- [PDF::COS::Tie]
  -- added :default trait
- [PDF::COS::Coercer]
  -- fixed coercement to a PDF::COS::TextString subset
- [PDF::Reader]
  -- Add revision-xrefs() method [to distinguish  revision
     sections from hybrid cross referefence sections]
  -- Tweaked filtering of object and cross reference streams
     during serialization

Release 0.3.2
- Handle null entries in stream DecodeParms entry (as per spec)
- Rename PDF::IO.substr() method to byte-str()
- `save-as()` method now copies an input PDF, then updates it incrementally.
- Add constant PDF::COS::DateString::DateRegex
- Add PDF::COS::Tie entry :key trait option
- Fix AES-128 encryption for xpdf

Release 0.3.1
- Add Tie :array-or-item trait. For the common case, where a
  single item or array of items is permitted.`
- add tmp/ directory for test JSON files, etc
- Adjust for 'pdf' -> 'ast' in PDF::Grammar 0.1.6.
- Changed the top level node from 'pdf' to 'cos' in JSON
  serializations
- Handle utf-16 encoding in PDF::COS::DateString

Release 0.3.0
- Renamed PDF::DAO classes to PDF::COS, where COS stands for
  Carousel Object System (see
  https://en.wikipedia.org/wiki/Portable_Document_Format#File_structure)
- Improvements to PDF::COS.coerce($obj, $type) multi methods.
- Fixed class-level PDF::COS::Stream.gist
- Support Hybrid PDFs that contain both cross reference tables and streams

Release 0.2.8
- [PDF::DAO]
  -- better support for lists and list to array coercion
- [PDF::DAO::Loader]
  -- replaced :$fallback option with :$base-class
- [PDF::DAO::Tie]
  -- add mixin method

Release 0.2.7
- [PDF::DAO::Tie]
  -- reintroduce method :entry(:alias) sub-trait.
  -- remove type-check method

Release 0.2.6
- [PDF::DAO::Util] setup libpdf at BEGIN time
- Rename or hide overused load() method in various classes/roles
  -- [PDF::DAO] [PDF::DAO::Loader] deprecate load() -> load-delegate()
  -- [PDF::Reader] rename load() -> load-pdf()
  -- [PDF::IO::Crypt] made load() method private
- Fix PNG predictors for BitsPerComponent < 8 (issue #18)

Release 0.2.5
- [PDF::Reader][PDF::Writer]
  -- adjust to PDF::Grammar v0.1.1 shaped cross reference streams.
  -- upgrade index offsets from uint32 to uint64 (for PDF files > 4.2Gb)
  -- don't escape binary characters when writing literal strings
- [PDF::DAO::Util]
  -- add coercements for typed arrays

Release 0.2.4
- [PDF]
  renamed .save-as :update option to :preserve
- Created classes PDF::DAO::Loader and PDF::DAO::Coercer. These
  replace the PDF::DAO::Delegator class.
- [PDF::DAO::Type::Xref]
  streamlined index decoding and encoding
- [PDF::Writer]
  tweak write-real method to match Lib::PDF::Writer.write-real

Release 0.2.3
- [PDF::DAO::Tie]
  -- Simplify method accessors. direct use of AT-KEY, ASSIGN-KEY,
     etc. 20% speed up of test suite run.
- [PDF::DAO::Util]
  -- convert enums to ints in to-ast()
  -- rename sub to-ast-native() -> ast-coerce()
- [PDF::Writer]
  -- use native functions from Lib::PDF::Writer, when available.

Release 0.2.2
- [PDF::Writer] handle ' (MoveShow) and " (MoveSetShow) operators
- [PDF::IO::Handle] Open I/O as :bin 
- Experimental use of Lib::PDF
  -- Speed up the slowest test xt/filter-predictors_bulk.t
  -- Fast packing alternative for PDF::IO::Util
  Optional, and for regression purposes, at this stage. Probably
  wont persue seriously until Rakudo has better JIT.

Release 0.2.1
- Renamed classes PDF::IO to PDF::IO::Util and PDF::IO::Input::*
  to PDF::IO::*.
- Don't cache misses in PDF::DAO::Delegator
- PDF::IO::Filter::Predictors now handles /BitsPerComponent < 8
- Replace PDF::IO::Util resample() with pack(), unpack()

Release 0.2.0
- Renamed class PDF::DAO::Type::PDF to PDF. Restored module name
  to PDF

Release 0.1.1
- [PDF::Reader] now handles very large xref tables or streams (> 65K)
- [PDF::DAO] use 'but' to apply roles to simple scalars, not 'does'.

Release 0.1.0
Renamed class namespace PDF::Storage -> PDF::IO. Used as the module
name

Release 0.0.9
- class PDF::DAO::Stream is now based on PDF::DAO::Dict
- withdrew non-standard PDF::DAO::Dict.new( $dict) positionals,
  in favour of PDF::DAO::Dict.new( :$dict ) named arguments.
  Same also for stream and array object constructors.
- Use of sigil-less variables, where appropriate.
- Revamped handing of PDF::DAO::Tie :entry and :index traits.
- Fixes for PDF::Storage::Input::Str (byte-string reader) and
  PDF::Storage::Filter::Predictors

Release 0.0.8
- [PDF::DAO::Doc] .update( :diffs(...) ) - now supports JSON
- Renamed classes
  -- PDF::DAO::Doc -> PDF::DAO::Type::PDF
  -- PDF::DAO::Storage::Crypt::Doc -> PDF::DAO::Storage::Crypt::PDF
- [PDF::DAO::Type::XRef] renamed methods
  -- decode-to-stage2 -> decode-index
  -- encode-from-stage2 -> encode-index
- [PDF::Writer]
  -- refactored 'write' multi method into node-specific methods
     (write-array, write-bool, ... etc)
  -- handle comments in write-op method
- [PDF::Writer] [PDF::Storage::Filter::RunLength] fixed handling
  of DOS newline graphemes "\r\n"
- [bin/pdf-rewriter.pl] fixed --rebuild option

Release 0.0.7
- [PDF::Storage::Crypt] Encryption refactored to use OpenSSL. Added support for
  PDF 1.6+ AES-128 encryption.
- [PDF::DAO::Doc] add saves-as( :update ) option.
  The input PDF is copied to the destination PDF, which is then incrementally
  updated. This should generally be faster than a regular .save-as.
- [PDF::Reader] Bug fixes to JSON serialization
- [PDF::Storage::Filter] simplified filter dispatch

Release 0.0.6
- [bin/pdf-rewriter.pl] unbust rewriting/recompression of encrypted PDFs
- [PDF::Storage::Serializer][PDF::DAO::{Array|Dict|Stream}] use Perl 6 object hashes
  -- Refactored `my %h; ...; %hash{$object.WHICH}` with `my %h{Any}; ...; %hash{$object}` 
     (See http://doc.perl6.org/type/Hash#Object_hashes_and_type_constraints)

- [PDF::DAO::Doc]
  -- added $doc.ast method. factored out from $doc.save-as
  -- Added $doc.Str method; for in-memory serialization
  -- $doc.save-as($target); # can now be file-name, io-path, or io-handle
  -- added $.update( :diffs(...) ) option.
  This allows the update body to be saved to a separate 'differences' file, as an
  alternative to appending to the original PDF.

  Useful in a mail-merge scenario where multiple documents are being produced
  from a common template and each can be reconstituted by appending the
  update file to the original template.

  Possible further work:
  -- JSON output of 'to' files
  -- add `$doc.open( $file, :diff(...))` option - load a base pdf, then apply
     differences.
- [PDF::Reader] bug-fixes:
  -- avoid encrypting the encryption dictionary
  -- fixed de-Linearization. Now handled by PDF::Storage::Serializer
- [PDF::Storage::Filter] bug fixes:
  -- fixed ascii-85, ascii-hex and run-length encoders to add
     end-of-data markers
  -- withdrew LZW encoding

Release 0.0.5
- added some reader exception classes, e.g. X::PDF::BadXRef
- renamed META.info => META6.json
- changed $.delegator.find-delegate method
- removed PDF::DAO::Type
- [PDF::DAO::Delegator]
  -- simplified and more general coercement to roles
  -- added X::PDF::Coerce warning
- [PDF::DAO::Tie]
  -- removed support for method aliases
- [PDF::Storage::Filter::Predictors]
  -- fixed multi-channel (color) PNG prediction

Release 0.0.4
- encrypted document creation is now supported. RC4 (Encryption revisions 1-4)
  only at this stage. 
- [PDF::Writer]
  -- add extra new-line after each indirect object - readability improvement

Release 0.0.3
- [PDF::DAO::Util] from-ast() sub now handles cyclical hashes and arrays

Release 0.0.2
- [META.info] Correct PDF::Storage::Filter::Predictors entry
- [PDF::Writer]
  -- improved formatting of PDF output. Reduced number of new-lines in output.
     --- '>> stream' are now cuddled together on a line
     --- as are 'endstream endobj'
  -- added $.make-body and $.make-xref methods

Release 0.0.1
- Initial release