You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to keep tables left to right as it was in the original text.
As an example, use https://srdata.nist.gov/solubility/IUPAC/SDS-65/SDS-65.pdf on page 47
The attached pdf is a jupyter notbook which shows what is this variable spacing left-to right flavor getText could provide.
I tried the processPage function on few books and it seems working properly.
Hey this is cool!
I have been planning to write a utility for a long time, that preserves the layout of a PDF page. There have also been multiple requests in that direction.
I would welcome a Pull Request and put this in the https://github.com/pymupdf/PyMuPDF-Utilities repo as a dedicated folder - let's say keep-text-layout, or whatever you want to choose.
I already have a few isolated scripts which solve one or the other problem. It would be good to have a growing selection of samples like this.
Your script however is much closer to an ideal, "universal" solution than anything I have done so far (although I could name a few PDFs which would still kill it 😉 ... but we are getting there).
If you are interested, I can also see if I can open that repo for update accees to you ...
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I wanted to keep tables left to right as it was in the original text.
As an example, use https://srdata.nist.gov/solubility/IUPAC/SDS-65/SDS-65.pdf on page 47
The attached pdf is a jupyter notbook which shows what is this variable spacing left-to right flavor getText could provide.
I tried the processPage function on few books and it seems working properly.
What do you think?
Nist.pdf
Beta Was this translation helpful? Give feedback.
All reactions