Post without Account — your post will be reviewed, and if appropriate, posted under Anonymous. You can also use this link to report any problems registering or logging in.

Documentation of PDF::API2

  • 1 Replies
  • 1970 Views
*

Offline Phil

  • Global Moderator
  • Sr. Member
  • *****
  • 430
    • View Profile
Documentation of PDF::API2
« January 31, 2017, 02:35:04 PM »
PDF::API2 could really use a good illustrated "book" to show how to use it, tutorial, cookbook, best techniques, etc. I've made something of a start with examples/Content.pl to illustrate what can be done with Content.pm (which I have extensively updated). Of course, it needs fleshing out with text describing each function, how it's best used, the sample code for the illustrated examples, and so on. If anyone is interested in participating in such an effort, let's discuss it here. You don't have to be an English major to be useful -- someone who can understand the existing code and come up with something of an outline (and examples to illustrate it) would be useful. I can edit your words into something readable (other editors/writers are welcome to participate).

I'm thinking that this could become an eBook (PDF format) shipped with PDF::API2, unless it's so large that it should be a separate item. It might even be sold (at a low price) for download, and/or as a paper book! Everyone who participated and contributed would get credit. We'd have to work out who would get paid and what percentage of the profits they get, and so on, but we'll cross that bridge when we come to it. Just be careful not to plagiarize other authors' works -- your contributions should be original work.

Of course, the current PDF::API2 library isn't really built for turning large amounts of markup into a PDF. There are a number of HTML (markup) to PDF converters out there, but they seem to be either expensive or not very good. Besides, whatever we use to create this document really ought to be based on PDF::API2! I've toyed with the idea of writing a basic HTML-to-PDF converter, as HTML is a nice markup language and you can use a browser to quickly preview your work. A general purpose converter is quite a bit of work, but if it's restricted to basic markup suitable for a book, it might be a feasible project.

*

Offline Phil

  • Global Moderator
  • Sr. Member
  • *****
  • 430
    • View Profile
Re: Documentation of PDF::API2
« Reply #1: March 30, 2017, 10:45:02 AM »
I've made something of a start for this, by releasing examples/Content.pl and examples/ContentText.pl, containing samples using those modules' methods (PDF::API2::Content and PDF::API2::Content::Text). You can read the Perl source and look at the PDF output. Eventually, if these are to form the core of any book or other true documentation, they will have to be fleshed out with the annotated source and a discussion of what's going on.