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
MarkLogic Corporation
[email protected]
Phone: +1 812-482-5224
Cell:  +1 812-630-7622
www.marklogic.com<http://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]<mailto:[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]<mailto:[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]<mailto:[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]<mailto:[email protected]>
Manage your subscription at:
http://developer.marklogic.com/mailman/listinfo/general


_______________________________________________
General mailing list
[email protected]<mailto:[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