开发者

Using PdfStamper How I can save the merged PDF under a folder using itext then read it

开发者 https://www.devze.com 2023-03-28 09:09 出处:网络
I need to save my merged PDF on my hard disk then load it as final PDF below is my code (with Safri on IPAD the PDF alwasy is empty)

I need to save my merged PDF on my hard disk then load it as final PDF

below is my code (with Safri on IPAD the PDF alwasy is empty)

            PdfReader reader = new PdfReader(folder + fileName);
            PdfStamper stamper = new PdfStamper( reader, out, '\0', true );
            AcroFields fields = stamper.getAcroFields();
            String fdfContent = (String) request.getAttribute("fdfContent");
            FdfReader fdfReader = new FdfReader(fdfContent.getBytes());
            fields.setFields(fdfReader);
            out.flush();
            sta开发者_高级运维mper.close();
            reader.close();

Many thanks


use

PdfStamper stamper = new PdfStamper( reader, out, '\0', false );
stamper.setFormFlattening(true);
0

精彩评论

暂无评论...
验证码 换一张
取 消