Pdf with pdf page stamp saved with space in the top ( pdf version 22.3 )and this happens only to docx/doc/docm that generated to pdf
The next code saves the pdf with the pdf stampa the result is set with space on the top -
for (int n = 1; n <= totalNumOfPages; n++) {
Document pdfTemplaeDocument = mapTemplateNameToPdfDoc
.get(fileData.getFileId().concat("-Template-").concat(pageSizeMap.get(n)).concat(".pdf"));
PdfPageStamp pageStamp = new PdfPageStamp(pdfTemplaeDocument.getPages().get_Item(1));
pageStamp.setYIndent(10);
pageStamp.setBackground(false);
pdfDocument.getPages().get_Item(n).addStamp(pageStamp);
pdfDocument.save(Utils.getDataDir().concat(fileData.getFileId()).concat(".pdf"));
}
I attached the filesfiles.zip (344.1 KB)