you can use below code for setting pdf version:
PdfReader reader = new PdfReader(pdfPath); PdfStamper stamper = new PdfStamper(reader, outputStream); stamper.setPdfVersion(PdfWriter.PDF_VERSION_1_4); stamper.close();