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

add support for -layout option #81

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Ravf95
Copy link

@Ravf95 Ravf95 commented Mar 2, 2021

No description provided.

@Ravf95 Ravf95 changed the title added support for -layout option add support for -layout option Mar 2, 2021
@@ -17,7 +17,7 @@ import (
)

// ConvertPages converts a Pages file to text.
func ConvertPages(r io.Reader) (string, map[string]string, error) {
func ConvertPages(r io.Reader, readability bool) (string, map[string]string, error) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Ravf95 this is a backwards incompatible change. Instead, we might have to explorer a solution like in my comment here: https://github.com/sajari/docconv/pull/75/files#r449309398

var body []byte
var err error
if readability {
body, err = exec.Command("pdftotext", "-q", "-nopgbrk", "-enc", "UTF-8", "-eol", "unix", "-layout", path, "-").Output()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'd want to collapse the shared arguments into one location and pass in -layout if readability is true.

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

Successfully merging this pull request may close these issues.

2 participants