2. Contents
• PD4ML – A Fresh Look
• Why PD4ML when we have ABCPDF?
• Pre-Requisite for PD4ML
• How PD4ML works?
• Lets See a Live Demo
• Deployment Process
• Take Away
3. PD4ML – A Fresh Look
• PD4ML is a very simple technique to create PDF from HTML
• PD4ML provides you both Java & .Net versions. Choose
what you want.
• The Java versions uses Servlets to serve the purpose, thus
your code to generate the PDF will be always separate from
your solution.
• It’s a light-weight, highly secure technique.
• Easy to use, easy to deploy and easy to maintain.
• Proper documentation available in http://pd4ml.com
4. Why PD4ML when we have ABCPDF?
ABCPDF PD4ML
• Every time we have to • Code implementation is
include the server side code very easy and flexible.
to generate PDF
• Difficult to achieve • PDF Portrait/Landscape
Portrait/Landscape properties are easy to
property. achieve
• Height/Width/Top/Left • Easily accessible PDF
margin Settings are tightly properties.
bound so difficult to achieve
• PDF creation by PD4ML is
• abcPdf strongly favours IE always independent of the
but it’s not cross browser browser.
• License Price: 329$ • License Price: 139$
5. Pre-Requisite For PD4ML
• Development Side:
– Net Beans IDE 6.5
– PD4MLTest project
• Server Side:
– JDK version > 6 update 13 http
://www.oracle.com/technetwork/java/javase/downloads/jdk-7u2-download-1377129.html
– Glassfish server 3.0
http://glassfish.java.net/downloads/3.0.1-final.html
– Adobe Acrobat Reader
http://www.adobe.com/support/downloads/detail.jsp?ftpID=5138
6. How PD4ML Works?
HTML to PDF Conversion
Post PD4ML
Transform to PDF
HTML Servlet
Save + Redirect
Data
PDF in PDF in your
Browser Application’s
Web Page
Redirection
7. Lets See a Live Demo
Sample HTML Page
index.html
PD4ML(index.jsp page)
Index.jsp
http://localhost:8080/PD4MLTest/index.html
8. Deployment Procedure
(as simple as 1..2..3)
1) Take the newly created “PD4MLTest.war” file from Dev
2) Deploy it under :
C:glassfishv3glassfishdomainsdomain1autodeploy
3) Test the URL:
http://<server ip/name>:8080/PD4MLTest/
Note: the “domain1 GlassFish Server” should be running
The diagram above illustrates the process used to compile and execute managed code, that is, code that uses the CLR. Source code written in C#, VB.NET, or some other language that targets the CLR is first transformed into MSIL by the appropriate language compiler. Before execution, this MSIL is JIT compiled into native code for whatever processor the code will run on. The default is to JIT compile each method when it is first called, but it’s also possible to “pre-JIT” the MSIL. With this option, all methods are compiled before the application is loaded, so the overhead of JIT compilation on each initial method call is avoided. One point worth noting is that all languages targeting the CLR should exhibit roughly the same performance. While some compilers may produce better MSIL code than others, large variations in execution speed are unlikely.