Spire.PDF for Python 11.12.1 のリリースをお知らせします。本バージョンでは、デジタル署名へのタイムスタンプ付与、PDF から Excel への変換時のオプション設定、PDF から Markdown への変換時に画像を無視する機能など、複数の新機能が追加されました。同時に、既知の問題 2 件も修正されています。詳細は以下の通りです。
このリリースで行われた変更のリストは次のとおりです
| カテゴリー | ID | 説明 |
| 新機能 | SPIREPDF-7326 | デジタル署名へのタイムスタンプ付与をサポートしました。
doc = PdfDocument ()
doc. LoadFromFile (inputFile)
# Create a digital signature
signature = Security_PdfSignature (doc, doc.Pages.get_Item(0), inputFile_pfx,"08100601", "signature")
signature.SignDetailsFont = PdfFont(PdfFontFamily.Courier,8.0)
# Set the bounds of the signature box
signature.Bounds = RectangleF(PointF(90.0, 550.0), SizeF (180.0, 90.0))
# Configure signature appearance and details
signature.NameLabel = "Digitally signed by:Gary"
signature.LocationInfoLabel ="Location:"
signature.LocationInfo = "CN"
signature.ReasonLabel = "Reaseon:"
signature.Reason = "Ensure authenticity"
signature.ContactInfoLabel = "Contact Number:"
signature.ContactInfo = "028-81705109"
# Set document permissions
signature.DocumentPermissions = PdfCertificationFlags.ForbidChanges.value
# Set graphic mode for the signature
signature.GraphicsMode = Security_GraphicMode.SignImageAndSignDetail
# Set the signature image
signature.SignImageSource = PdfImage.FromFile(inputImage)
#When setting “none", the Image and Detail are distributed on both sides, when setting “Stretch", the image extends to the entire signatu
signature.SignImageLayout = SignImageLayout.none
url = "https://freetsa.org/tsr"
signature.ConfigureTimestamp(url)
signature.ConfigureHttpOCSP (None, None)
signature.Certificated = True
doc.SaveToFile(outputFile)
doc.Close() |
| 新機能 | - | PDF から Excel 変換時のテキストレイアウトオプションの設定に対応。
pdf = PdfDocument() pdf.LoadFromFile(inputFile) textOption = XlsxTextLayoutOptions(True, False, False) pdf.ConvertOptions.SetPdfToXlsxOptions(textOption) pdf.SaveToFile(outputFile, FileFormat.XLSX) pdf.Dispose() |
| 新機能 | - | PDF から Excel 変換時の線レイアウト設定に対応。
pdf = PdfDocument() pdf.LoadFromFile(inputFile) lineOption = XlsxLineLayoutOptions(False,False,False,False) pdf.ConvertOptions.SetPdfToXlsxOptions(lineOption) pdf.SaveToFile(outputFile, FileFormat.XLSX) pdf.Dispose() |
| 新機能 | - | PDF から Excel 変換時の表レイアウト設定に対応。
# Load the PDF document from the specified input file path pdf.LoadFromFile(inputFile) # Set the XlsxSpecialTableLayoutOptions as the conversion options for PDF to XLSX conversion options = XlsxSpecialTableLayoutOptions(False, False, False) # Save the PDF document as an Excel file using the specified format and options pdf.SaveToFile(outputFile, FileFormat.XLSX) |
| 新機能 | - | OFD 変換オプションの設定に対応。
pdf = PdfDocument () pdf. LoadFromFile (inputFile) ofdOptions = OfdOptions() ofdOptions.UseTempFileStorage = True pdf.ConvertOptions.SetPdfToOfdOptions(ofdOptions) pdf.SaveToFile(outputFile,FileFormat.OFD) |
| 新機能 | - | PDF から Markdown 変換時に画像を無視する設定に対応。
# Create an instance of PdfToMarkdownConverter with the input PDF file converter = PdfToMarkdownConverter(inputFile) # Configure the converter to skip processing images in the PDF converter.MarkdownOptions.IgnoreImage = True # Convert the PDF content to Markdown format and save to the output file converter.ConvertToMarkdown(outputFile) |
| 新機能 | SPIREPDF-7870 | PDF から SVG 変換時の出力サイズ (幅/高さ) 設定に対応。
converter = PdfToSvgConverter(inputFile) converter.SvgOptions.ScaleX = 1.0 converter.SvgOptions.ScaleY = 1.0 converter.Convert(outputFile) |
| Bug | SPIREPDF-7670 | PDF を PPTX に変換する際に表の枠線が失われる問題を修正。 |
| Bug | SPIREPDF-7868 | PdfGrid でセル枠線設定時に例外が発生する問題を修正。 |
以下のリンクから Spire.PDF for Python 11.12.1 をダウンロードできます:






