smalot / smalot/pdfparser

Not working with Japanese

Open
#100 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
2.7k
Forks
579
Avg merge
2m
Merged PRs (30d)
1

Description

I need to extract text from a PDF file in Japanese. But pdfparser can't seem recognize the file charset encoding. It just output an unreadable string like

\w ���w ��� � /�����yyy/� �Fq� J�yyy/�S�M��dyyy/�q� �Cyyy/�>; �Cyyy/��������yyy/�]b;tKh�yyy/��� ����y /����yyyy/� � � �Cyyyyy/� � a �� �yyyy/���� wyyy/� a �Ugyyy/����� e{yyyy/�2�" Copyright(c)2014 Daiichikizai.,Co.,Ltd All rights reserved.

Please help.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported unreadable output from a Japanese PDF and inspect the PDF text-extraction path; the issue names no source file or test. Done means Japanese text is extracted legibly without regressing existing PDF parsing, with a regression test covering the reported encoding case.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.