Spire.Office for Java

ニュース&リリース

2026-06-30

Spire.Office for Java 11.6.0 のリリース

Spire.Office for Java 11.6.0 のリリースをお知らせします。本バージョンでは、Spire.Doc for Java、Word→PDF 変換機能を強化。Spire.XLS for Java Excel から PDF および画像への変換を強化。Spire.PDF for Java、PDF の読み取り方向と言語設定に対応。詳細は以下をご覧ください。

Spire.Office for Java 11.6.0 を入手する場合は、以下のリンクをクリックしてください:

変更内容一覧

Spire.Doc for Java

カテゴリー ID 説明
不具合修正 SPIREDOC-11785 Word から PDF への変換時、記号の折り返しが不正になる不具合を修正しました。
不具合修正 SPIREDOC-11908 相互参照フィールドの更新処理が不正となる不具合を修正しました。
不具合修正 SPIREDOC-11920 Word から PDF への変換時、テキストの配置位置がずれる不具合を修正しました。
不具合修正 SPIREDOC-11947 Word から PDF への変換時、箇条書きスタイルが崩れる不具合を修正しました。

Spire.XLS for Java

カテゴリー ID 説明
不具合修正 SPIREXLS-6137 Excel を PDF に変換する際のページ区切りが正しくない問題を修正しました。
不具合修正 SPIREXLS-6147 ワークシートを画像に変換する際にアプリケーションがハングアップする問題を修正しました。
不具合修正 SPIREXLS-6156 Excel を画像に変換する際にコンテンツが切り取られる問題を修正しました。

Spire.PDF for Java

カテゴリー ID 説明
新機能 SPIREPDF-7829 SHA-256/SHA-512 アルゴリズム証明書を使用したデジタル署名をサポートしました。
public static void main(String[] args) throws IOException {
        // Create pdf document
        PdfDocument doc = new PdfDocument();
        // Load file from disk
        doc.loadFromFile("Sample.docx");
        // Load the X509 certificate for signature
        PdfPKCS7Formatter formatter = new PdfPKCS7Formatter(new PdfCertificate("gary.pfx", "e-iceblue"), false);
        // Create an instance of PdfOrdinarySignatureMaker using the loaded document and certificate
        PdfOrdinarySignatureMaker signatureMaker = new PdfOrdinarySignatureMaker(doc, formatter);
        // Create an instance of PdfCustomSignatureAppearance as the appearance for the signature
        IPdfSignatureAppearance signatureAppearance = new PdfCustomSignatureAppearance();
        // Make the signature with a specified name and the custom appearance
        signatureMaker.makeSignature("Signature", signatureAppearance);
        // Iterate through all hash algorithm types
        for (HashAlgorithmType hashAlg : HashAlgorithmType.values()) {
        // Skip SM3 (case-insensitive)
            if ("SM3".equalsIgnoreCase(hashAlg.name())) {
                continue;
            }
            try {
                // Set the current hash algorithm
                formatter.getProperties().setHashAlgorithm(hashAlg);
                String filePath = "AddImageSignature_" + hashAlg.name() + ".pdf";
                doc.saveToFile(filePath, FileFormat.PDF);
                System.out.println("Succeed:" + hashAlg.name());
            } catch (Exception ex) {
                System.out.println("Error HashAlgorithmType:" + hashAlg.name());
                System.out.println("Error Info:" + ex.getMessage());
            }
        }
        // Close the document
        doc.close();
    }
    // Custom signature appearance implementation
    public static class PdfCustomSignatureAppearance implements IPdfSignatureAppearance {
        @Override
        public void generate(PdfCanvas pdfCanvas) {
            // Set font size
            int fontSize = 10;
            // Create Arial font
            PdfTrueTypeFont font = new PdfTrueTypeFont(new Font("Arial", Font.PLAIN, fontSize), true);
            // Set line height
            float lineHeight = fontSize;
            // Draw text string
            pdfCanvas.drawString("AAAAAAAAAAA", font, PdfBrushes.getRed(), new Point.Float(0, 0));
            // Draw image at specified position
            pdfCanvas.drawImage(PdfImage.fromFile("E-iceblue logo.png"), new Point.Float(20, 0));
        }
}
新機能 SPIREPDF-8077 OFD から PDF への変換時に代替フォントを設定する機能を追加しました。
OfdConverter converter = new OfdConverter(ofdFile.getAbsolutePath());
converter.getOptions().setDefaultFontName(fontName);
converter.toPdf(PdfPath); 
新機能 SPIREPDF-8078 OFD から PDF への変換に進捗コールバック機能を追加しました。
CustomProgressNotifier progressNotifier =new CustomProgressNotifier(output_txt);
    ofdConverter ofdconverter=new Ofdconverter(inputPath);
    ofdconverter.registerProgressNotifier(progressNotifier);
    ofdConverter.toPdf(outputPath);

    CustomProgressNotifier progressNotifier2=new CustomProgressNotifier(output_txt2);
    PdfToWordConverter converter=new PdfTowordConverter(inputPath2);
    converter.registerProgressNotifier(progressNotifier2);
    converter.saveToDocx(outputPath2)
新機能 SPIREPDF-7990 PDF の読み取り方向と言語を設定する機能を追加しました。
PdfDocument pdf = new PdfDocument();
pdf.loadFromFile(inputFile);
pdf.getViewerPreferences().setReadingDirection(PdfReadingDirection.LeftToRight);
pdf.setLanguage("zh-CN");
pdf.saveToFile(outputFile , FileFormat.PDF);
新機能 SPIREPDF-8091 PdfMDPSignatureMaker に IPdfSignatureFormatter のオーバーロードを追加し、PDF 署名操作における書式設定をより柔軟に行えるようになりました。
PdfDocument document = new PdfDocument();
PdfPageBase pdfPageBase = document.getPages().add();
pdfPageBase.getCanvas().drawString("Hello, World!",
new PdfFont(PdfFontFamily.Helvetica, 30f),
PdfBrushes.getBlack(), 10, 10);

PdfCertificate certificate = new PdfCertificate(path+"gary.pfx", "e-iceblue");
PdfPKCS7Formatter formatter = new PdfPKCS7Formatter(certificate, false);
String timeStampUrl = "https://rfc3161.ai.moda/adobe";
formatter.setTimestampService(new TSAHttpService(timeStampUrl));
formatter.setOCSPService(new OCSPHttpService(null));

PdfMDPSignatureMaker signatureMaker = new PdfMDPSignatureMaker (document, formatter, PdfMDPSignatureMaker.Level2Permissions);
signatureMaker.makeSignature("signName");
com.spire.pdf.interactive.digitalsignatures.PdfSignature signature = signatureMaker.getSignature();
signature.setName("Gary");
// signature.setReason("This is the final version.");
signature.setLocation("U.S.");
signature.setContactInfo("112554");

PdfSignatureAppearance appearance = new PdfSignatureAppearance(signature);
appearance.setNameLabel("Signer: ");
// appearance.setReasonLabel("Reason: ");
appearance.setLocationLabel("Location: ");
appearance.setContactInfoLabel("Phone: ");

PdfImage image = PdfImage.fromFile(path+"logo.png");
appearance.setSignatureImage(image);

appearance.setGraphicMode(GraphicMode.SignImageAndSignDetail);

Rectangle2D rect = new Rectangle2D.Float();
rect.setFrame(new Point2D.Float(90, 550), new Dimension(150, 80));

signatureMaker.makeSignature("Signature", pdfPageBase,
    (float) rect.getMinX(), (float) rect.getMinY(),
    (float) rect.getWidth(), (float) rect.getHeight(),
    appearance);

String output = "signature.pdf";
document.saveToFile(path+output, FileFormat.PDF);
document.close(); 
不具合修正 SPIREPDF-8040 権限パスワードを指定せずに PDF を読み込むと例外が発生する問題を修正しました。
不具合修正 SPIREPDF-8060 画像を PDF に変換する際に例外が発生する問題を修正しました。
不具合修正 SPIREPDF-8065 PDF を PDF/A に変換した際にチェックマークが消失する問題を修正しました。
不具合修正 SPIREPDF-8067 PDF ページから抽出したテキストに文字化けが発生する問題を修正しました。
不具合修正 SPIREPDF-8079 PDF を SVG に変換した際、ブラウザーで誤った内容が表示される問題を修正しました。
不具合修正 SPIREPDF-5475 署名の正当性検証結果が正確でない不具合を修正しました。
不具合修正 SPIREPDF-8086 画像が正しくレンダリングされない不具合を修正しました。