I need to modify the creationDate of my pdf created using iText.
For me is enough to remove the time information putting 00:00:00 from the date.
Is it possible to do during pdf creation with pdfWriter?
Thank you! Marco
I need to modify the creationDate of my pdf created using iText.
For me is enough to remove the time information putting 00:00:00 from the date.
Is it possible to do during pdf creation with pdfWriter?
Thank you! Marco
I got it.. It is simple! You can do it at generation time:
PdfDictionary info = writer.getInfo();
Calendar cal = Calendar.getInstance();
cal.set(Calendar.HOUR, 0);
cal.set(Calendar.MINUTE, 0);
cal.set(Calendar.SECOND, 0);
info.put(PdfName.CREATIONDATE, new PdfDate(cal));
info.put(PdfName.MODDATE, new PdfDate(cal));