[xep-support] CoolTool - Package Builder

From: Kevin Brown <kevin@renderx.com>
Date: Wed Sep 17 2014 - 15:04:07 PDT

Have you ever had the need to build up a package PDF? What I mean is that
maybe you have a few static PDF documents and a few other documents that are
generated with RenderX ... but you want one PDF?

Well, in making use of one little trick in the RenderX Intermediate Format,
we put together a demo showing exactly how you can do this with the current
RenderX software.

I say current because this demo makes use of the new <rx:insert-document>
extension that allows you to insert an entire external PDF into the
composition. While you certainly could just use that extension, we made up a
demo that allows you to insert any combination of XML+XSL and static PDFs
into one packaged output.

I am not going to bother posting the actual Java programs, they are free to
anyone emailing me who would be interested in this feature. It takes in an
XML file like this:

<package>
    <document
pdf="C:\Users\kbrown01\Desktop\ConcatPackage\Tests\test24.pdf"/>
    <document xml="C:\Users\kbrown01\Desktop\ConcatPackage\Tests\hammer.xml"
xsl="C:\Users\kbrown01\Desktop\ConcatPackage\Tests\hammer.xsl"/>
    <document
pdf="C:\Users\kbrown01\Desktop\ConcatPackage\Tests\test30.pdf"/>
    <document
xml="C:\Users\kbrown01\Desktop\ConcatPackage\Tests\hammer2.xml"
xsl="C:\Users\kbrown01\Desktop\ConcatPackage\Tests\hammer.xsl"/>
    <document
xml="C:\Users\kbrown01\Desktop\ConcatPackage\Tests\hammer3.xml"
xsl="C:\Users\kbrown01\Desktop\ConcatPackage\Tests\hammer.xsl"/>
    <document
pdf="C:\Users\kbrown01\Desktop\ConcatPackage\Tests\test34.pdf"/>
    <!-- and more and more -->
</package>

It processes this list of documents, formatting any XML+XSL pair and
injecting any static PDF, in any order you wish, directly into an output
stream of PDF. Yes, it is only for PDF right now.

We'll include in the future in the Developer's Kit, if you are interested in
the Java code I would be happy to send along. Oh and it's pretty fast doing
this, here's the results of the last test I did:

This on my laptop computer (note - laptop computer):
 
Approx 33.6 seconds total time
Formatted output is 1148 pages
168 separate documents from XML+XSL file transformations, approx five pages
each and each one includes 7 images (so 1176 images read also)
168 Inserted PDFs, 84 are 1 page and 84 are two pages
Approx. 34 pages/second performance for the total package to be built
 
Run as a .bat file from the command prompt, output is below
 
****************
C:\Users\kbrown01\Desktop\ConcatPackage>echo 21:34:20.25
21:34:20.25
 
C:\Users\kbrown01\Desktop\ConcatPackage>"C:\Program
Files\Java\jdk1.7.0_04\bin\j
ava" -classpath "C:\Program Files
(x86)\RenderX\XEPWin\xep\lib\xep.jar;C:\Users\
kbrown01\Desktop\ConcatPackage" ConcatPackageFormatter
C:\Users\kbrown01\Desktop
\ConcatPackage\Tests\package.xml
C:\Users\kbrown01\Desktop\ConcatPackage\Tests\o
utput.pdf 1>log.txt 2>&1
 
C:\Users\kbrown01\Desktop\ConcatPackage>echo 21:34:53.87
21:34:53.87

Kevin Brown
(650) 327-1000 Direct
(650) 328-8008 Fax
(925) 395-1772 Mobile
skype:kbrown01
kevin@renderx.com
sales@renderx.com
http://www.renderx.com

_______________________________________________
(*) To unsubscribe, please visit http://lists.renderx.com/mailman/options/xep-support
(*) By using the Service, you expressly agree to these Terms of Service http://w
ww.renderx.com/terms-of-service.html
Received on Wed Sep 17 15:04:24 2014

This archive was generated by hypermail 2.1.8 : Wed Sep 17 2014 - 15:04:31 PDT