File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes iText in Struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "iText in Struts" Watch "iText in Struts" New topic

iText in Struts

Vani Bandargal
Ranch Hand

Joined: Oct 06, 2005
Posts: 82
I am using iText in Struts to produce pdf. I know want my pdf to be editable.
Does anybody know how to do it.
Note: I only need to edit the text. I am only displaying some palin text(the purpose is for letter generation)
I also don't need to retrive back the editable information.
All I need is to make the content(text) editable

Please advice me what I am missing

public ActionForward doGenerateLeterPDF(ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse response) throws WebException {
Document document = new Document();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
PdfWriter writer = PdfWriter.getInstance(document, baos);;
document.add(new Paragraph("Hello World"));

ServletOutputStream out = response.getOutputStream();
}catch(Exception e)
logger.error("Exception: " + e);
throw new WebException(e);

return null;


[ February 02, 2007: Message edited by: Vani D Bandargal ]

[ February 02, 2007: Message edited by: Vani D Bandargal ]
[ February 02, 2007: Message edited by: Vani D Bandargal ]
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
Please don't post the same question to multiple forums: CarefullyChooseOneForum

Let's continue the discussion in this duplicate thread, where you have an answer already.
[ February 02, 2007: Message edited by: Ulf Dittmer ]
I agree. Here's the link:
subject: iText in Struts
It's not a secret anymore!