How to set writer in PDFStamper?

134 views Asked by At

I want to update the writer in PDFStamper in itext. I am using getWriter method to get the writer of my stamper object. Updated the run direction for that writer but I'm not able to understand how can I set this writer to stamper. Adding the code I tried here:

PdfStamper stamper = new PdfStamper(reader, new FileOutputStream(dest));
stamper.getWriter().setRunDirection(PdfWriter.RUN_DIRECTION_RTL);
System.out.println(stamper.getWriter().getRunDirection());
stamper.close();
reader.close();

This is not working and somehow run direction stays the same. Can you please help me resolve this issue?

0

There are 0 answers