Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for two bugs related to Unicode translation support by Font objects #698

Merged
merged 20 commits into from
May 20, 2024

Commits on Apr 5, 2024

  1. Fix for two bugs related to Unicode translation support by Font objects

    Symptom was that some documents' contents was rendering as a bunch of
    control characters.  These are the untranslated strings.  This was
    happening because for two different reasons, these strings weren't being
    translated \Smalot\PdfParser\Font::decodeContent() in some circumstances.
    
    First fix is to \Smalot\PdfParser\Font::loadTranslateTable():
    
      - Fixed bug where bfchar sections weren't loaded due to mistake in regexp.
      - It now uses `*` instead of `+` and thus supports translation tables with
        lines like `<0000><0000>`.  (Required `<0000> <0000>` before.)
    
    Second fix is for documents that attach their Font objects to the Pages
    object instead of each Page object:
    
      - \Smalot\PdfParser\Page now has a setFonts() method
      - \Smalot\PdfParser\Pages now declares its $fonts variable
      - \Smalot\PdfParser\Pages::getPages() now applies the object's fonts to each child Page
      - \Smalot\PdfParser\Pages::getFonts() copied from Page class
    unixnut committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    e1edb34 View commit details
    Browse the repository at this point in the history
  2. Pages.php typo fix

    Added relative namespace for `ElementMissing`
    unixnut authored Apr 5, 2024
    Configuration menu
    Copy the full SHA
    c96c145 View commit details
    Browse the repository at this point in the history

Commits on Apr 10, 2024

  1. Configuration menu
    Copy the full SHA
    cd947ad View commit details
    Browse the repository at this point in the history
  2. Update Pages.php to make getFonts() protected

    Requested by @k00ni
    unixnut authored Apr 10, 2024
    Configuration menu
    Copy the full SHA
    6c1c349 View commit details
    Browse the repository at this point in the history

Commits on Apr 19, 2024

  1. Refined Pages instance

    new getFonts method not only
    returned stored fonts but also built related fonts
    list. With this changes its easier to test and the
    replacement (setupFonts) only builds the fonts list.
        
    Also refined some phpdoc comments.
    k00ni authored Apr 19, 2024
    Configuration menu
    Copy the full SHA
    8a8ea2c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b20ee6a View commit details
    Browse the repository at this point in the history
  3. Update Pages.php

    k00ni authored Apr 19, 2024
    Configuration menu
    Copy the full SHA
    f761dd7 View commit details
    Browse the repository at this point in the history
  4. Update Pages.php

    k00ni authored Apr 19, 2024
    Configuration menu
    Copy the full SHA
    ab1c62b View commit details
    Browse the repository at this point in the history

Commits on Apr 29, 2024

  1. Configuration menu
    Copy the full SHA
    ff83e11 View commit details
    Browse the repository at this point in the history
  2. Update Pages.php

    k00ni authored Apr 29, 2024
    Configuration menu
    Copy the full SHA
    9831b93 View commit details
    Browse the repository at this point in the history
  3. Update Page.php

    k00ni authored Apr 29, 2024
    Configuration menu
    Copy the full SHA
    ab010ff View commit details
    Browse the repository at this point in the history
  4. Update PagesTest.php

    k00ni authored Apr 29, 2024
    Configuration menu
    Copy the full SHA
    fe21246 View commit details
    Browse the repository at this point in the history
  5. Update PagesTest.php

    k00ni authored Apr 29, 2024
    Configuration menu
    Copy the full SHA
    6899a17 View commit details
    Browse the repository at this point in the history
  6. Update PagesTest.php

    k00ni authored Apr 29, 2024
    Configuration menu
    Copy the full SHA
    34012c2 View commit details
    Browse the repository at this point in the history

Commits on Apr 30, 2024

  1. PagesTest.php: fixed comment

    k00ni authored Apr 30, 2024
    Configuration menu
    Copy the full SHA
    7d93afe View commit details
    Browse the repository at this point in the history

Commits on May 10, 2024

  1. Configuration menu
    Copy the full SHA
    80b3e30 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4c64f4e View commit details
    Browse the repository at this point in the history
  3. Update PagesTest.php

    k00ni authored May 10, 2024
    Configuration menu
    Copy the full SHA
    bf91ad2 View commit details
    Browse the repository at this point in the history
  4. Update PagesTest.php

    k00ni authored May 10, 2024
    Configuration menu
    Copy the full SHA
    4b21319 View commit details
    Browse the repository at this point in the history

Commits on May 16, 2024

  1. Configuration menu
    Copy the full SHA
    aa3adfc View commit details
    Browse the repository at this point in the history