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

preserveOnlyMultipleLineBreaks does not work on PDF when eol:'dos' #199

Open
thegoatherder opened this issue Jan 30, 2020 · 0 comments
Open

Comments

@thegoatherder
Copy link

thegoatherder commented Jan 30, 2020

Trying to extract text from PDF using textract.fromFileWithPath() in a Windows environment. Using textract v2.5.0

The following config is set:

{
  preserveOnlyMultipleLineBreaks: true,
  pdftotextOptions: { 
    eol: 'dos', 
    layout: 'raw', 
    encoding: 'UTF-8', 
    splitPages: true }
}

I have found that preserveOnlyMultipleLineBreaks: true is not working as expected. When the setting is on, the output converts \r\n to \r. But AFAIK \r on its own doesn't mean anything in Windows or Unix systems. I'm expecting it instead to convert \r\n\r\n to \r\n and to remove solo \r\n completely from the text output.

Seems like a bug?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant