Add-Ons & Services
The POCO C++ Libraries Blog

POCO, JSON, ExtJS, PDF and RowFormatter

Filed under: News by alex at 01:18

If anyone wonders what are those recent sandbox commits about, I’ve been working on some reports recently and opted to use ExtJS in conjunction with the sandbox JSON and PDF libraries.

Well, the verdict is that those two sandbox libs are actually quite stable and usable. JSON even comes with ExtJS remoting (a.k.a. Ext.Direct) support. Using Poco::PDF library, I was able to code a PDFFormater (a RowFormatter child class which plugs into the RecordSet to chew on SQL and spit out a PDF) in a matter of hours. And it’s amazingly fast – a 100+ pages document pops up within few seconds*.

The main change to the RowFormater is that it has two modes now – progressive and bulk. Progressive is for formats that can be easily streamed in chunks, as recordset rows are generated (such as HTML, XML, JSON etc). Bulk is used where it makes more sense to generate the whole formatted output before streaming it (e.g. PDF).

* The timing includes querying, populating recordset, generating PDF and streaming it over HTTP (on localhost, although database is on a different machine)

  1. Awesome enhancement! That’s cool to have a PDF generator in C++ :D Most of the time I had to resort to Java or PHP, which I don’t really desire, they just require too many dependencies.

    Looking forward to Poco 1.3.6 :) Thanks for good job!

    Comment by Viet on November 5, 2009, 06:07

  2. Very much looking forward to 1.3.6

    Comment by atu123 on November 10, 2009, 04:00

RSS RSS feed for comments on this post. TrackBack URI

Leave a comment