for(int i-=0; i<firstItems.size(); i++
{
table.addCell(String.valueOf(firstItems.get(z)));
document.add(table);
document.close();
response.addHeader("Content-Disposition", "attachment; filename="test.pdf");
OutputStream out = response.getOutputStream();
baos.writeTo(out);
out.flush();
}
Hi I got an error stating the document has been closed. You can't add any Elements.
joshua_8 0 Newbie Poster
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.