Web meets Print

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Web meets Print

Robert J. Cordingley
There seem to be frustratingly few resources and tools to help with what
seems like a relatively simple and common word processing need.

I want to server-side generate a report from a database, automatically
paginate it and prepare a table of contents ready for printing.  I'm
scripting in PHP against a MySQL database.  I already generate the
report in HTML/CSS for presentation on a web page where browser printing
leaves much to be desired anyway.  Content includes styled text and
images.  I don't know ahead of time how much text will be provided by
the database or the sizes of any images which are served by URLs.  The
final document can be of the order of 100-200 pages.

Any suggestions or recommendations?
Thanks
Robert Cordingley

============================================================
FRIAM Applied Complexity Group listserv
Meets Fridays 9a-11:30 at cafe at St. John's College
to unsubscribe http://redfish.com/mailman/listinfo/friam_redfish.com
Reply | Threaded
Open this post in threaded view
|

Re: Web meets Print

Marcus G. Daniels
On 5/11/13 9:22 AM, Robert J. Cordingley wrote:
> I want to server-side generate a report from a database, automatically
> paginate it and prepare a table of contents ready for printing.  I'm
> scripting in PHP against a MySQL database.  I already generate the
> report in HTML/CSS for presentation on a web page where browser
> printing leaves much to be desired anyway. Content includes styled
> text and images.  I don't know ahead of time how much text will be
> provided by the database or the sizes of any images which are served
> by URLs.  The final document can be of the order of 100-200 pages.
>
If LaTeX is too unstructured, DocBook might work for you.

http://www.docbook.org/tdg5/en/html/docbook.html

Pandoc is a powerful converter from there..

http://johnmacfarlane.net/pandoc/

It might be too optimistic to convert your existing HTML to LaTeX, but
it might be worth a try.

Marcus

============================================================
FRIAM Applied Complexity Group listserv
Meets Fridays 9a-11:30 at cafe at St. John's College
to unsubscribe http://redfish.com/mailman/listinfo/friam_redfish.com
Reply | Threaded
Open this post in threaded view
|

Re: Web meets Print

Robert J. Cordingley
Hey Marcus
Thanks for the pointers which I will look at closely.  So far, they
indicate to me that this is not a trivial task!
Robert C

On 5/11/13 9:30 PM, Marcus G. Daniels wrote:

> On 5/11/13 9:22 AM, Robert J. Cordingley wrote:
>> I want to server-side generate a report from a database,
>> automatically paginate it and prepare a table of contents ready for
>> printing.  I'm scripting in PHP against a MySQL database.  I already
>> generate the report in HTML/CSS for presentation on a web page where
>> browser printing leaves much to be desired anyway. Content includes
>> styled text and images.  I don't know ahead of time how much text
>> will be provided by the database or the sizes of any images which are
>> served by URLs. The final document can be of the order of 100-200 pages.
>>
> If LaTeX is too unstructured, DocBook might work for you.
>
> http://www.docbook.org/tdg5/en/html/docbook.html
>
> Pandoc is a powerful converter from there..
>
> http://johnmacfarlane.net/pandoc/
>
> It might be too optimistic to convert your existing HTML to LaTeX, but
> it might be worth a try.
>
> Marcus
>
> ============================================================
> FRIAM Applied Complexity Group listserv
> Meets Fridays 9a-11:30 at cafe at St. John's College
> to unsubscribe http://redfish.com/mailman/listinfo/friam_redfish.com
>
>


============================================================
FRIAM Applied Complexity Group listserv
Meets Fridays 9a-11:30 at cafe at St. John's College
to unsubscribe http://redfish.com/mailman/listinfo/friam_redfish.com
Reply | Threaded
Open this post in threaded view
|

Re: Web meets Print

scaganoff
I've run into this problem twice in the last 12 months in ruby projects. I've dealt with it in two different ways:

1. Use the 'win32' library in ruby to write out to an MS Word document. In this case I did report generation followed by ad hoc (manual) edits and styling. I wouldn't recommend it but can provide code if you want to go this way.

2. In another project where I had to produce PDF invoices I used the Prawn library which is essentially a ruby DSL for generating PDF: http://prawn.majesticseacreature.com/

Regards,
Saul


On 12 May 2013 23:46, Robert J. Cordingley <[hidden email]> wrote:
Hey Marcus
Thanks for the pointers which I will look at closely.  So far, they indicate to me that this is not a trivial task!
Robert C


On 5/11/13 9:30 PM, Marcus G. Daniels wrote:
On 5/11/13 9:22 AM, Robert J. Cordingley wrote:
I want to server-side generate a report from a database, automatically paginate it and prepare a table of contents ready for printing.  I'm scripting in PHP against a MySQL database.  I already generate the report in HTML/CSS for presentation on a web page where browser printing leaves much to be desired anyway. Content includes styled text and images.  I don't know ahead of time how much text will be provided by the database or the sizes of any images which are served by URLs. The final document can be of the order of 100-200 pages.

If LaTeX is too unstructured, DocBook might work for you.

http://www.docbook.org/tdg5/en/html/docbook.html

Pandoc is a powerful converter from there..

http://johnmacfarlane.net/pandoc/

It might be too optimistic to convert your existing HTML to LaTeX, but it might be worth a try.

Marcus

============================================================
FRIAM Applied Complexity Group listserv
Meets Fridays 9a-11:30 at cafe at St. John's College
to unsubscribe http://redfish.com/mailman/listinfo/friam_redfish.com




============================================================
FRIAM Applied Complexity Group listserv
Meets Fridays 9a-11:30 at cafe at St. John's College
to unsubscribe http://redfish.com/mailman/listinfo/friam_redfish.com



--
Saul Caganoff
Enterprise IT Architect
Mobile: +61 410 430 809
LinkedIn: http://www.linkedin.com/in/scaganoff

============================================================
FRIAM Applied Complexity Group listserv
Meets Fridays 9a-11:30 at cafe at St. John's College
to unsubscribe http://redfish.com/mailman/listinfo/friam_redfish.com
Reply | Threaded
Open this post in threaded view
|

Re: Web meets Print

Brent Auble
You may want to look at BIRT (http://www.eclipse.org/birt/phoenix/).  It's a Java-based reporting engine built on Eclipse, and intended to take data from databases and produce reports.  "BIRT is an Eclipse-based open source reporting system for web applications, especially those based on Java and Java EE. BIRT has two main components: a report designer based on Eclipse, and a runtime component that you can add to your app server. BIRT also offers a charting engine that lets you add charts to your own application."

Technically, it can probably do what you're looking for -- pull together data, text and images from a DB -- and produce a PDF report on a server.  However, it's in Java, which may not bring you joy, and there will likely be a good bit of a learning curve and significant effort to get the reports set up the way you want.

I haven't used it yet, but I make sure to install the components every time I update Eclipse, just in case I get inspired to do some Java-based DB reporting... 

Brent


From: Saul Caganoff <[hidden email]>
To: The Friday Morning Applied Complexity Coffee Group <[hidden email]>
Sent: Sunday, May 12, 2013 7:30 PM
Subject: Re: [FRIAM] Web meets Print

I've run into this problem twice in the last 12 months in ruby projects. I've dealt with it in two different ways:

1. Use the 'win32' library in ruby to write out to an MS Word document. In this case I did report generation followed by ad hoc (manual) edits and styling. I wouldn't recommend it but can provide code if you want to go this way.

2. In another project where I had to produce PDF invoices I used the Prawn library which is essentially a ruby DSL for generating PDF: http://prawn.majesticseacreature.com/

Regards,
Saul


On 12 May 2013 23:46, Robert J. Cordingley <[hidden email]> wrote:
Hey Marcus
Thanks for the pointers which I will look at closely.  So far, they indicate to me that this is not a trivial task!
Robert C


On 5/11/13 9:30 PM, Marcus G. Daniels wrote:
On 5/11/13 9:22 AM, Robert J. Cordingley wrote:
I want to server-side generate a report from a database, automatically paginate it and prepare a table of contents ready for printing.  I'm scripting in PHP against a MySQL database.  I already generate the report in HTML/CSS for presentation on a web page where browser printing leaves much to be desired anyway. Content includes styled text and images.  I don't know ahead of time how much text will be provided by the database or the sizes of any images which are served by URLs. The final document can be of the order of 100-200 pages.

If LaTeX is too unstructured, DocBook might work for you.

http://www.docbook.org/tdg5/en/html/docbook.html

Pandoc is a powerful converter from there..

http://johnmacfarlane.net/pandoc/

It might be too optimistic to convert your existing HTML to LaTeX, but it might be worth a try.

Marcus

============================================================
FRIAM Applied Complexity Group listserv
Meets Fridays 9a-11:30 at cafe at St. John's College
to unsubscribe http://redfish.com/mailman/listinfo/friam_redfish.com




============================================================
FRIAM Applied Complexity Group listserv
Meets Fridays 9a-11:30 at cafe at St. John's College
to unsubscribe http://redfish.com/mailman/listinfo/friam_redfish.com



--
Saul Caganoff
Enterprise IT Architect
Mobile: +61 410 430 809
LinkedIn: http://www.linkedin.com/in/scaganoff

============================================================
FRIAM Applied Complexity Group listserv
Meets Fridays 9a-11:30 at cafe at St. John's College
to unsubscribe http://redfish.com/mailman/listinfo/friam_redfish.com


============================================================
FRIAM Applied Complexity Group listserv
Meets Fridays 9a-11:30 at cafe at St. John's College
to unsubscribe http://redfish.com/mailman/listinfo/friam_redfish.com