我正在制作学生入学表格,如学生姓名,手机号码,电话号码,父亲姓名等。我有2张10行6列的表格 新学生输入的详细信息将在下一页中以适当的形式显示(示例 - 设计html页面原始表单的外观)。现在我想将其保存为pdf。
我应用了代码,但显示错误。
代码
String s="";
try{
String ref=request.getHeader("referer");
URL url = new URL(ref);
BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream()));
String line;
while ((line = reader.readLine()) != null){
s=s+line;
}
Document doc=new Document(PageSize.A5.rotate());
File f=new File("C:\\Users\\DILJEET\\Desktop\\data111.pdf");
PdfWriter.getInstance(doc, new FileOutputStream("C:\\Users\\DILJEET\\Desktop\\data111.pdf"));
doc.open();
HTMLWorker htmlWorker = new HTMLWorker(doc);
htmlWorker.parse(new StringReader(s));
doc.close();
reader.close();
}catch(Exception e){
System.out.println(e);
}
错误
java.io.IOException: Server returned HTTP response code: 500 for URL: http://localhost:8084/finalproject/fillfeedbackformaction.jsp