Thank you all for your valuable inputs. I will try the options we discussed
here.

Regards,
Vimal C
On Sep 2, 2015 8:58 PM, "David Lee" <[email protected]> wrote:

> >>   Just wanted to point out that you should not have the start up
> overhead if you wrap FOP in a servlet
>
>
>
> Yes that's exactly what I was recommending (and did).  Using a servlet or
> some equivalent technology that is running in a 'always on' JVM or at least
> one that hangs around for a while ( in case your load is occasional spikes
> you can use a simple start-on-demand-but-wait-a-while server)
>
>
>
>
>
>
> -----------------------------------------------------------------------------
>
> David Lee
> Lead Engineer
> *Mark**Logic* Corporation
> [email protected]
> Phone: +1 812-482-5224
>
> Cell:  +1 812-630-7622
> www.marklogic.com
>
>
>
> *From:* [email protected] [mailto:
> [email protected]] *On Behalf Of *Florent Georges
> *Sent:* Wednesday, September 02, 2015 8:52 AM
> *To:* MarkLogic Developer Discussion <[email protected]>
> *Subject:* Re: [MarkLogic Dev General] Generate PDF from Marklogic
>
>
>
>   Hi David,
>
>   Just wanted to point out that you should not have the start up overhead
> if you wrap FOP in a servlet, as the JVM is not loading the classes over
> and over again, it's done only once.
>
>   From experience, the critical part is to connect the various components
> properly (that is, the servlet HTTP layer and FOP).  I've seen a lot of
> examples on the web serializing XML as a String to parse it again, or
> saving FOP result in a byte array to pass it as a result of the servlet,
> instead of streaming properly between HTTP and FOP.
>
>   Regards,
>
>
> --
> Florent Georges
> http://fgeorges.org/
> http://h2oconsulting.be/
>
> On 2 September 2015 at 14:20, David Lee wrote:
>
> I've done the same thing for PDFS.   For a previous $mployeer I used a
> locally running embedded tomcat server with a simple servlet that ran a
> simple xmlsh script (could be any language) that ran the FOP processing and
> then returned the PDF as a binary.
>
> If you need high throughput, its critical to not have to start heavyweight
> processes for each invocation.  Many FOP implementations are Java based
> which have a high startup time (200ms+).
>
> That's fine for 10 jobs not 10,000 ... hence using a service that keeps
> the FOP processor 'loaded'.
>
> For high performance, or maximizing licensing value you may want to move
> the FOP processing off-server --
>
> Modern alternatives may appropriate, such as a pool of Docker and/or web
> services shared by all the ML servers to offload the FOP processing and
> scale it independent of the ML processing needs.
>
>
>
>
> -----------------------------------------------------------------------------
>
> David Lee
> Lead Engineer
> *Mark**Logic* Corporation
> [email protected]
> Phone: +1 812-482-5224
>
> Cell:  +1 812-630-7622
> www.marklogic.com
>
>
>
> *From:* [email protected] [mailto:
> [email protected]] *On Behalf Of *vimal c
> *Sent:* Wednesday, September 02, 2015 2:09 AM
> *To:* MarkLogic Developer Discussion <[email protected]>
> *Subject:* Re: [MarkLogic Dev General] Generate PDF from Marklogic
>
>
>
> Thanks Florent and David for your inputs.
>
>
>
> Regards,
>
> Vimal C
>
>
>
> On Tue, Sep 1, 2015 at 8:20 PM, David Ennis <[email protected]>
> wrote:
>
> I've done something similar to what Florent suggests in the past with the
> Java flying saucer Library (XML or XHTML + CSS2 = PDF).
>
>
>
> I think no matter how you wrap it up and what the details are, its the
> same pattern used over and over with MarkLogic for external functionality -
> create an HTTP service in the language of your choice to do the thing you
> want done and post to that service.
>
>
>
> Kind Regards,
>
> David Ennis
>
>
>
> On 1 September 2015 at 16:43, Florent Georges <[email protected]> wrote:
>
>   Hi,
>
>   As far as I know, there is no built-in way.  I think the usual way is to
> use XSLT on MarkLogic to generate XSL-FO, and use xdmp:http-post() to send
> it to an endpoint an XSL-FO processor listens to (typically Apache FOP,
> wrapped in Cocoon or in an in-house Java HTTP endpoint).
>
>   This setup is reasonably easy.  I guess searching for "fop marklogic"
> should give a few links about that technique.
>
>   Regards,
>
>
>
>
>
> --
>
> Florent Georges
> http://fgeorges.org/
> http://h2oconsulting.be/
>
>
>
> On 1 September 2015 at 16:00, vimal c wrote:
>
> Hi All,
>
>
>
> Is it possible to generate .pdf file from marklogic?
>
>
>
> I see that we can convert a pdf document to xhtml files and parts by using
> xdmp:pdf-convert.
>
>
>
> But Do we have any way in marklogic to create a .pdf file out of the xml
> content saved in marklogic?
>
>
>
>
>
> Any idea would be really helpful.
>
> Thanks in advance.
>
>
>
> Regards,
>
> Vimal C
>
>
> _______________________________________________
> General mailing list
> [email protected]
> Manage your subscription at:
> http://developer.marklogic.com/mailman/listinfo/general
>
> --
> <http://developer.marklogic.com/mailman/listinfo/general>
>
> Florent Georges
> <http://developer.marklogic.com/mailman/listinfo/general>
> http://fgeorges.org/
> http://h2oconsulting.be/
>
>
>
>
> _______________________________________________
> General mailing list
> [email protected]
> Manage your subscription at:
> http://developer.marklogic.com/mailman/listinfo/general
>
>
>
>
> _______________________________________________
> General mailing list
> [email protected]
> Manage your subscription at:
> http://developer.marklogic.com/mailman/listinfo/general
>
>
>
>
> _______________________________________________
> General mailing list
> [email protected]
> Manage your subscription at:
> http://developer.marklogic.com/mailman/listinfo/general
>
>
>
>
> _______________________________________________
> General mailing list
> [email protected]
> Manage your subscription at:
> http://developer.marklogic.com/mailman/listinfo/general
>
>
_______________________________________________
General mailing list
[email protected]
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to