使用具有第五个参数的构造函数,以便重置图形上下文。
public PDPageContentStream(PDdocument document, PDPage sourcePage, boolean appendContent, boolean compress, boolean resetContext) throws IOException
或者,通过调用在第一个内容流中保存和恢复图形状态
saveGraphicsState();// ...restoreGraphicsState();

使用具有第五个参数的构造函数,以便重置图形上下文。
public PDPageContentStream(PDdocument document, PDPage sourcePage, boolean appendContent, boolean compress, boolean resetContext) throws IOException
或者,通过调用在第一个内容流中保存和恢复图形状态
saveGraphicsState();// ...restoreGraphicsState();