[Public - disclosed]
<%@ page import="java.io.*" %>
<%@ page import="java.awt.Color" %>
<%@ page import="com.merck.ptli.utils.*" %>
<%@ page import="com.lowagie.text.*" %>
<%@ page import="com.lowagie.text.pdf.*" %>
<%@ page import="com.lowagie.text.xml.*" %>
<%@ page import="javax.xml.parsers.*" %>
<head><title>Making PDF files test</title></head>
<body>
// Create objects
Document pdfDoc = new Document(PageSize.A4,48,32,32,32);
Date docStamp = new Date();
String docURL = "/documents/pdf/" + docStamp.getTime() + ".pdf";
String docPath = appinfo.stGetHtmlPath() + docURL;
PdfWriter.getInstance(pdfDoc, new FileOutputStream(docPath));
SAXParser xmlParser = SAXParserFactory.newInstance().newSAXParser();
try {
xmlParser.parse("http://myserver/xmldata/doctemplates/teste.xml", new SAXiTextHandler(pdfDoc));
}
catch (Exception e) {
out.println("<p>" + e.toString() + "</p>");
return;
}
location.href='';
</script>
</html>
<!DOCTYPE ITEXT SYSTEM "http://itext.sourceforge.net/itext.dtd">
<itext creationdate="Seg 19 JUL 2004" producer="Carlos Santos">
<chunk font="Helvetica" size="12.0" fontstyle="normal, underline" red="128" green="128" blue="255">XML TEST</chunk>
</itext>
Systems Engineer Web Developer
MSD Portugal - IT Department
Intranet & E-Initiatives
' +351 21 446
5774
È +351 96 852
0488
. [EMAIL PROTECTED]
------------------------------------------------------------------------------
Notice: This e-mail message, together with any attachments, contains information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates (which may be known outside the United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as Banyu) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system.
------------------------------------------------------------------------------
