-
Notifications
You must be signed in to change notification settings - Fork 376
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
Word wrapping #18
Comments
This problem is a direct reflection of PDF text data stream structure: the string is in 2 text blocks in PDF, although it "appears" as one visually. Currently, I don't have enough time to work on an "auto word merge" or "auto word concatenation" during parsing, if anybody wants to take it on, a pull request is welcomed. |
Looking at the JSON above, shouldn't attribute w refer to the width of text and if so, x + w for the first text be less or equal to x of the second? If so, they appear to be in different units. |
Short answer is no. Because there might be kernings or spacings between them. But you are right about the unit, w should be converted by lib/pdfunit. Because the w value is not always accurate so it's not used in client renderer, I may forget to process it. I'll take a look at it when I get some time. |
fixed in v1.0.7 |
I'm still experiencing the unit issue on v1.1.7. "4)narzędzia i urządzenia, których używanie może zagrażać życiu lub zdrowiu:" while the JSON output is:
It doesn't seem to add up. Am I doing something wrong? |
{
"x": 7.9914062500000025,
"y": 3.984375000000001,
"w": 1292.917,
"clr": 0,
"A": "left",
"R": [
{
"T": "SECTION%3A%20CON",
"S": -1,
"TS": [3, 182, 0, 0]
}
]
},
{
"x": 19.10241171875,
"y": 3.984375000000001,
"w": 984.6790000000001,
"clr": 0,
"A": "left",
"R": [
{
"T": "TACT%20LENS",
"S": -1,
"TS": [3, 182, 0, 0]
}
]
},
This was the "SECTION: CONTACT LENS" string in reference PDF.
The text was updated successfully, but these errors were encountered: