Live data from Hacker News

Show HN: Parsing horse racing charts with Apache PDFBox

github.com

1–10 of 32 posts

Re: Show HN: Parsing horse racing charts with Apache PDFBox

#4
post #3

what I would love is an app that would reformat portrait PDFs as 2-column landscape for reading on my screen

Most PDF viewers I am aware of (including my own, PostView) have 2 up modes, are those not sufficient?

that's still presenting the pages in portrait orientation. I want the pages to be landscape and for the text to flow in at least 2 columns.

Re: Show HN: Parsing horse racing charts with Apache PDFBox

#5
post #3

Earlier quoted context omitted.

Most PDF viewers I am aware of (including my own, PostView) have 2 up modes, are those not sufficient?

that's still presenting the pages in portrait orientation. I want the pages to be landscape and for the text to flow in at least 2 columns.

PDF is used primarily for pre-paginated media and does not reflow text; if the PDF author wanted the pages in landscape orientation, or using some other paper dimensions, he would have specified that. Same goes for margins and the like.

Re: Show HN: Parsing horse racing charts with Apache PDFBox

#6
post #5

Earlier quoted context omitted.

that's still presenting the pages in portrait orientation. I want the pages to be landscape and for the text to flow in at least 2 columns.

PDF is used primarily for pre-paginated media and does not reflow text; if the PDF author wanted the pages in landscape orientation, or using some other paper dimensions, he would have specified that. Same goes for margins and the like.

Doesn't mean the author isn't wrong for my reading situation... Or isn't doing it just cause everyone else is.

Re: Show HN: Parsing horse racing charts with Apache PDFBox

#9
Very interesting! I had never heard of Apache PDFBox before, I must give it a try. I have a similar program that parses horse racing PDFs from sites such as www.racehorserunner.com - which are of a much simpler format, but cause endless problems for me when the PDFs have layout problems. For example, issues like one column being too long and overlapping with another, e.g the last race on http://www.racehorserunner.com/Archives/ELP/ELP170702.pdf

All PDF parsers that I have tried cope very badly with these kind of situations, and often try to be 'too clever' in that they value the final layout of the text over and above the individual strings.

Have you experienced similar problems with PDFBox, or does it handle formatting and layout fairly reliably?

Re: Show HN: Parsing horse racing charts with Apache PDFBox

#10
I still don't understand how PDF could become one of the standards for publishing documents. Well structured content gets converted into PDF which loses most of that structure. And then a lot of work is done to guess that structure from PDF and convert it back to a better file format. It just shows that successful solutions don't have to be technically good.
Post reply on HN