无法写入核心转储核心转储已被禁用要启用核心转储,请在使用 Itext7 再次启动 Java 之前尝试“ulimit -c unlimited”

问题描述

当我尝试使用 Itext7 更新 PDF 文件时,出现错误“无法写入核心转储。核心转储已被禁用。要启用核心转储,请在再次启动 Java 之前尝试“ulimit -c unlimited””

我的代码

String src="pdf1.pdf";

String dest="pdf1.pdf";
   
PdfDocument pdfDoc = new PdfDocument(new PdfReader(src),new PdfWriter(dest));
Document document = new Document(pdfDoc);
   
//Create canvas from the last page
PdfCanvas canvas = new PdfCanvas(pdfDoc.addNewPage());
   
canvas.beginText().setFontAndSize(
        PdfFontFactory.createFont(FontConstants.HELVETICA),12)
            .moveText(265,597)
            .showtext("I agree to the terms and conditions.")
            .endText();
   
document.close()

enter image description here

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)