Community PDF Project (was Revenue and the Open Source edition)

Paul Dupuis paul at researchware.com
Wed May 4 13:28:25 EDT 2016


On 5/4/2016 12:13 PM, RM wrote:
> I would suppose the ideal thing would be both something that allows
> one to render a PDF document,
> and extract all or part of an embedded text layer (if one exists in
> the original PDF).

The XPDF external from LiveCode for OSX and Win is based on Google's
PDFium library. I can say this because I know something about the
details of XPDF. Researchware (my company) development XPDF and recently
transferred the rights to LiveCode.

Richard is correct in that the XPDF external not only opens and displays
a PDF, but allows zooming, navigation, layout, hyperlinks, selection of
text (for PDFs with editable text) or any potion of any page as an image
selection, and allows you to extract text or images. It also supports
password protected PDFs and more. Therefore, if ALL you want is just to
display pages from a PDF it is certainly more than you may need. The
same could be said about the feature set of LiveCode itself.

Richmond just showed that some people want more - in his case,
extraction of all of part of the text. If you ONLY want to do that under
script control, then that would be an incremental effort over just
displaying a PDF.

If you want the USER to be able to select text (or images), then that is
a significant chunk of work beyond just displaying a PDF as the PDFium
library contains NO APIs for user selection and that must be original
code added by the external. A large amount of effort went into making
sure user selection of text was as good as Adobe or Preview or Foxit's
PDF viewers, which was definitely not as easy as one might expect (or hope)!

I can tell you that a LOT of developer time (i.e money) went into the
creation, QA testing, and refinement of XPDF.

Obviously, since Google PDFium is open source, anyone can create an
alternative to XPDF, perhaps an even better version. If people want to
build one, I encourage it. A competitive market of LiveCode PDF widgets
just gives me more choice for my company's PDF needs ;-) However,  I
offer the caution of experience that there are a lot more little
"gotchas" in working with PDFium that anyone may realize, even after
reading the APIs, and making another from scratch may be much more work
than people might expect.

I think those interested in PDF might be better off continuing to lobby
for LiveCode to offer XPDF as an add-on (like so many other excellent LC
add-ons from Chartmaker to Wordlib to RRP Spell) for a appropriate
price. It seems only logical that eventually they would convert it to an
LC8 Widget as well.





More information about the Use-livecode mailing list