Developer Tools
|
Office Productivity Applications
|
Enterprise Solutions
|
|||||||||||||||||||||||







I am new to JSP but decided to give this a try anyway. First, I had to install the Apache Tomcat Server.
JAVA_HOME for the JDK installation folder.C:\ drive. Installation over.CATALINA_HOME with the path to the Tomcat folder.

bin\startup.bat file using this account. (I am still on XP and my regular account is a full-blown Admnistrator account.)


Next, I had to create a JSP script that used PDFOne to create a new PDF document and send it down to the browser.
lib in the C:\apache-tomcat-7.0.14\webapps\ROOT\WEB-INF for the PDFOne JAR files.C:\apache-tomcat-7.0.14\webapps\ROOT\test.jsp with the following content.
<%@page import="com.gnostice.pdfone.PDFOne" %> <%@page import="com.gnostice.pdfone.PdfDocument" %> <%@page import="com.gnostice.pdfone.fonts.PdfFont" %> <%@page import="java.awt.Color" %> <% // Activate your license PDFOne.activate("your-pdfone-activation-key", "your-pdfone-product-key"); try { // Create a new PDF document PdfDocument doc = new PdfDocument(); // Access the default font and modify it PdfFont defaultFont = doc.getFont(); defaultFont.setStyle(PdfFont.STROKE_AND_FILL); defaultFont.setSize(60); defaultFont.setStrokeColor(Color.RED); defaultFont.setStrokeWidth(2); defaultFont.setColor(Color.YELLOW); // Prepare the browser response.setContentType("application/pdf"); response.setBufferSize(2000); // Set PDF version to 1.4 for backward compatibility doc.setVersion(PdfDocument.VERSION_1_4); // Render text on the first page doc.writeText("Hello, World!", 100, 100); // Save the document to the browser doc.save(response.getOutputStream()); // Close the document doc.close(); // Close the browser output response.flushBuffer(); } catch (Exception e) { out.println("Sorry, an error occurred " + e.getMessage() ); } %>

---o0O0o---
| Our Developer Tools | |
|---|---|
eDocEngine VCLA Delphi/C++Builder component suite for creating documents in over 20 formats and also export reports from popular Delphi reporting tools. |
PDFtoolkit VCLA Delphi/C++Builder component suite to edit, enhance, view, print, merge, split, encrypt, annotate, and bookmark PDF documents. |
XtremePDFConverter VCLA Delphi/C++Builder component to intelligently convert PDF to user-friendly Word RTF documents. |
|
PDFOne .NETA .NET PDF component suite to create, edit, view, print, reorganize, encrypt, annotate, and bookmark PDF documents in .NET applications. |
XtremeDocumentStudio .NETMulti-format document-processing component suite for .NET developers |
PDFOne (for Java™)A Java™ PDF component suite to create, edit, view, print, reorganize, encrypt, annotate, bookmark PDF documents in Java™ applications. |
XtremeFontEngine (for Java)Java font engine to render glyphs from Type 1, Type 2 (CFF), and TrueType fonts |
| Our Office Productivity Applications |
|---|
Free PDF ReaderA free, fast, and portable application for viewing, printing and converting PDF documents. |
| Privacy | Legal | Feedback | Newsletter | Resellers | © 2002-2013 Gnostice Information Technologies Private Limited. All rights reserved. |
This site is best viewed on a screen with minimum resolution of 1152 x 864 pixels. Windows XP users are advised to use Microsoft ClearType Tuning for optimal experience. Also, please use the latest version of a standards-compliant browser such as Firefox, Opera, or Dragon (Chromium).