Skip to content
Snippets Groups Projects
  1. Mar 01, 2023
    • Sven M. Hallberg's avatar
      df03908f
    • Sven M. Hallberg's avatar
      avoid an assert in parse_fonts · dee6c415
      Sven M. Hallberg authored
      This is an assertion of the type that catches an error (in user-supplied
      data) that should be handled, namely the case where the /Font entry
      of a dictionary is expected to be itself a dictionary but isn't.
      The code already contains a path for the case where the /Font entry
      is missing (return false) and I suppose the same, including the
      TODO item "figure out how to handle", might as well apply instead
      of the assertion.
      
      Fixes #45.
      dee6c415
  2. Feb 28, 2023
  3. Feb 27, 2023
  4. Feb 17, 2023
  5. Jan 13, 2023
  6. Jan 06, 2023
  7. Jan 05, 2023
  8. Dec 21, 2022
  9. Dec 20, 2022
    • Sven M. Hallberg's avatar
      style/comment · e10c9f98
      Sven M. Hallberg authored
      e10c9f98
    • Sven M. Hallberg's avatar
      lzw: simplify grammar by using h_bind to choose code length · 8e6bcd9c
      Sven M. Hallberg authored
      This replaces the validations on code9 etc. with one continuation that
      picks the appropriate parser.
      
      Also relaxes the parser to allow further output codes after the table is
      full. Looking at the spec, it seems to me at this times that the
      requirement for a clear code when the table is full is a requirement on
      producers of PDF files, but not on the file format itself. As far as I
      understand, conforming files can be created by a non-conforming process.
      
      Note: The implementation uses a slight trick to handle the last code
      (4095) correctly. Quoting the comment in act_output():
      
          Rather than going through the effort of ensuring that the last
          code is only updated once, we simply assign one more code as a
          dummy.
      
      So, the table is now 4097 entries in actual size. The last one will
      receive a bogus update every cycle, so that the last real code does not.
      This is less work than actually detecting and avoiding the bogus updates.
      8e6bcd9c
  10. Dec 19, 2022
Loading