Skip to content

[Bug]: Extracted text is not readable #215

Closed

Description

@k00ni

Is there an existing issue for this?

  • I have searched the existing issues and found no similar reports

Are you using the latest version of this package?

  • The issue I'm reporting exists in the latest release

Can other PDF readers read the file?

  • The PDF I'm trying to read opens correctly in at least one other PDF reader

When running this snippet

$text = (new PdfParser())->parseFile('/path/to/file.pdf')->getText();

I run into the following issue/exception (Please attach the pdf)

The parser extracts the following content:

'HXWVFKHU�%XQGHVWDJ	'UXFNVDFKH�	���	����
����:DKOSHULRGH	����������
$QWZRUW�
GHU�%XQGHVUHJLHUXQJ�
DXI�GLH�.OHLQH�$QIUDJH�GHU�$EJHRUGQHWHQ�-|UJ�&H]DQQH��'HVLUHH�%HFNHU��9LROHWWD�
%RFN��&ODUD�%�QJHU��$QQH�0LHNH�%UHPHU��.DWULQ�)H\��'U��*UHJRU�*\VL��/XNH�+R‰��
)HUDW�.RoDN��-DQ�.|VWHULQJ��6RQMD�/HPNH��7DPDUD�0D]]L��%RGR�5DPHORZ��'DYLG�
6FKOLHVLQJ��$DURQ�9DOHQW��'RQDWD�9RJWVFKPLGW��&KULVWLQ�:LOOQDW��-DQLQH�:LVVOHU�
XQG�GHU�)UDNWLRQ�'LH�/LQNH�
±�'UXFNVDFKH���������±
1HXEDX�GHV�%XQGHVNULPLQDODPWV�LQ�:LHVEDGHQ
9 R U E H P H U N X Q J � G H U � ) U D J H V W H O O H U
'DV	�+HVVLVFKH	�0LQLVWHULXP	�GHU	�)LQDQ]HQ�	�GDV	�%XQGHVNULPLQDODPW	��%.$�	�GLH�
%XQGHVDQVWDOW	� I�U	� ,PPRELOLHQDXIJDEHQ	� �%,P$	� XQG	� GLH	� /DQGHVKDXSWVWDGW�
:LHVEDGHQ	��/+:	�SODQHQ	�LP	�5DKPHQ	�GHU	�VWlGWHEDXOLFKHQ	�(QWZLFNOXQJVPD‰�
QDKPH	� Ä2VWIHOG³	� GHQ	� 1HXEDX	� HLQHV	� ]HQWUDOHQ	� &DPSXV	� I�U	� GDV	� %.$�	� =LHO	� LVW�
HV�	� GLH	� ELVODQJ	� �EHU	� GDV	� 6WDGWJHELHW	� YHUVWUHXWHQ	� 
[...]

Here is what the PDF-Viewer shows:

Image

Uploaded PDF: btd_21_1407_2101407.pdf

Online-Version of the PDF: https://dserver.bundestag.de/btd/21/014/2101407.pdf

PS: Further PDFs of this kind can be found here: https://dip.bundestag.de/erweiterte-suche?f.wahlperiode=21&f.herausgeber_dokumentart=Bundestag-Drucksache&f.drucksachetyp_p=02Antworten&f.drucksachetyp_p=02Antworten~Antwort&rows=25&sort=verteildatum_ab

Do you allow attachment files to be used in tests to prevent regressions?

  • Yes, I give permission to use this file as a test file to prevent future regressions (And am authorized to give this permission)

Activity

  1. removed their assignment
    on Sep 18, 2025
  2. PrinsFrank commented on Sep 19, 2025

    @PrinsFrank
    Owner

    This one is also fixed after the implementation of Encoding/Differences and some other fixes! I'll prepare a release tomorrow!

  3. added a commit that references this issue on Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions