Add page number to pdf using pdfstamper(Itext)
问题 I have this code protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { ByteArrayOutputStream output = new ByteArrayOutputStream(); try{ response.setContentType("application/pdf"); response.setHeader("Content-Disposition", "inline; filename=details.pdf"); try{ Document document = new Document(PageSize.A4, 20, 20, 130, 20); PdfWriter writer=PdfWriter.getInstance(document, output); document.open(); BaseFont bf = BaseFont.createFont