Aspose.Pdf for Java 19.5で、「尊」という文字列が存在するPDFのページに対して
AddImage()を使用して画像を差し込むと、例外エラーが発生します。
具体的なソースコードとエラーは以下の通りです。
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
doc = new Document(System.getProperty(“user.dir”) . “\BASE.pdf”);
page = doc.getPages().get_Item(1);
String FilePath = System.getProperty("user.dir") . "\QRImage.png";
java.io.InputStream stream3 = new java.io.FileInputStream(FilePath);
// AddQrCode
page.addImage(stream3 ,new com.aspose.pdf.Rectangle(0,0,0,0)); // ← Error
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
class com.aspose.pdf.internal.l9j.lu
Attempted to read past the end of the stream.
com.aspose.pdf.internal.l5n.l0n$lI.deserialize(Unknown Source)
com.aspose.pdf.internal.l9j.le.deserialize(Unknown Source)
com.aspose.pdf.internal.l5n.l1n.lI(Unknown Source)
com.aspose.pdf.internal.l9h.lk.lI(Unknown Source)
com.aspose.pdf.internal.l9h.ld.lI(Unknown Source)
com.aspose.pdf.internal.l2y.lu.lI(Unknown Source)
com.aspose.pdf.internal.l2y.lu.lI(Unknown Source)
com.aspose.pdf.OperatorCollection.lb(Unknown Source)
com.aspose.pdf.OperatorCollection.ld(Unknown Source)
com.aspose.pdf.OperatorCollection.size(Unknown Source)
com.aspose.pdf.Page.lI(Unknown Source)
com.aspose.pdf.Page.lI(Unknown Source)
com.aspose.pdf.Page.lI(Unknown Source)
com.aspose.pdf.Page.lI(Unknown Source)
com.aspose.pdf.Page.lI(Unknown Source)
com.aspose.pdf.Page.addImage(Unknown Source)
※実際に使用したPDFとpng画像です。
Image.zip (5.0 KB)