pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Hewson <j...@jahewson.com>
Subject Re: PDFbox : Can it be used to modifying templates for generating reports
Date Thu, 27 Aug 2015 16:45:56 GMT

> On 26 Aug 2015, at 20:56, Sumit Sandal <Sumit_Sandal@infosys.com> wrote:
> 
> Thanks Bruno. JasperReport and BIRT were one of the options I was considering. I don't
have any experience in Jasper/BIRT that's why I was looking some thing more of Java library.
> On further clarifications for requirements, I can say that we need Pdf with table created
using dynamic data in columns and rows ,that will be decided what JSON response is received
.
> I had a POC done earlier in PDFBox, I personally found using PDFbox in my case is not
easy to configure [spc. when there are many PDFs to be created with tables of varying columns
and rows], though PDFBox has more options programmatically. Am I right about this?

Yes, PDFBox is a low-level library. So it can manipulate PDFs in some very powerful ways but
it doesn't do fancy typesetting such as tables, because they aren't a feature of the PDF format.

You could write your own table layout code by measuring the text and drawing the appropriate
lines. But that's probably not what you're after.

> Yesterday completed another one using Apache FOP which for me had flow like mentioned
below. My impression so far is It is easily configurable since only xml-fo are to be created.

Yes, FOP is a fully fledged typesetting engine and can easily handle this.

-- John

> But the part where I have to convert JSON to XML has lot of hardcoding. I will be looking
for some library which can convert JSON directly to XML with minimum hardcoding
> JSON Response  >> XML >> Using XML-FO >> PDF
> Thanks
> Sumit Sandal
> From: Bruno Svorinic [mailto:BRUNO@MIT-Software.hr]
> Sent: Wednesday, August 26, 2015 1:04 PM
> To: users@pdfbox.apache.org
> Subject: Re: PDFbox : Can it be used to modifying templates for generating reports
> 
> From what you wrote I think you would be better of using JasperReport to create PDF from
some template and data coming from database (or JSON or whatever). I think PDFBox (like iText
which Jasper I believe uses) is more oriented at manipulating PDF's on lower level...
> 
> Just my 2 cents...
> 
> Bruno
> 
>>>> Sumit Sandal <Sumit_Sandal@infosys.com<mailto:Sumit_Sandal@infosys.com>>
25.8.2015. 15:00 >>>
> Hi All,
> 
> I want to implement a solution which parses JSON and picks values from it to generate
PDF from templates.
> Kind of Reports.
> But have to check width and height of Tables as well.
> Will PDFbox be able to help. From what I have learnt today after going through PDFBox
site is that it is not that much of great tool for editing templates and generating dynamic
pdfs.
> 
> If no, please suggest a good open source library to use. An example doing this will be
applauded heavily :)
> 
> 
> 
> Thanks & Regards
> Sumit
> 
> **************** CAUTION - Disclaimer *****************
> This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely
> for the use of the addressee(s). If you are not the intended recipient, please
> notify the sender by e-mail and delete the original message. Further, you are not
> to copy, disclose, or distribute this e-mail or its contents to any other person and
> any such actions are unlawful. This e-mail may contain viruses. Infosys has taken
> every reasonable precaution to minimize this risk, but is not liable for any damage
> you may sustain as a result of any virus in this e-mail. You should carry out your
> own virus checks before opening the e-mail or attachment. Infosys reserves the
> right to monitor and review the content of all messages sent to or from this e-mail
> address. Messages sent to or from this e-mail address may be stored on the
> Infosys e-mail system.
> ***INFOSYS******** End of Disclaimer ********INFOSYS***
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org<mailto:users-unsubscribe@pdfbox.apache.org>
> For additional commands, e-mail: users-help@pdfbox.apache.org<mailto:users-help@pdfbox.apache.org>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


Mime
View raw message