Spire.PDF for Python

ニュース&リリース

2026-09-24

Spire.PDF for Python 12.9.4 複数の PDF 注釈と Code 128 バーコードに対応

Spire.PDF for Python 12.9.4 のリリースをお知らせいたします。本バージョンでは、Caret、Circle、Square、FileAttachment、Movie、Screen、RichMedia、Widget など、複数の PDF 注釈への対応を追加しました。また、PdfCode128ABarcode インターフェースによる Code 128 バーコードの描画にも対応しました。さらに、PDF 添付ファイル、テキスト置換、テキスト抽出、テキスト位置などに関するいくつかの不具合を修正しました。詳細は以下の通りです。

変更内容一覧
カテゴリー ID 説明
新機能 — Caret 注釈に対応しました。
rect = RectangleF(100.0, 100.0, 10.0, 15.0)
  annotation = PdfCaretAnnotation(page, rect)
  annotation.Title = "CaretTest"
  annotation.Contents = "A caret annotation with default (None) symbol."
  annotation.Color = PdfRGBColor(0, 0, 255)
  annotation.Border.Width = 1
  annotation.Intent = "ParaCaret"
  PdfAnnotationCollection.Create(page).Add(annotation)
新機能 — Circle 注釈に対応しました。
annotation = PdfCircleAnnotation(page, rect)
  annotation.Color = PdfRGBColor(128, 0, 128)
  annotation.InteriorColor = PdfRGBColor(255, 255, 200)
  annotation.Border.Width = 2
  annotation.Border.Style = PdfBorderStyle.Solid
  annotation.Border.Effect = PdfBorderEffect.Cloudy
  annotation.Border.EffectIntensity = 2
  PdfAnnotationCollection.Create(page).Add(annotation)
新機能 — Square 注釈に対応しました。
annotation = PdfSquareAnnotation(page, rect)
  annotation.Color = PdfRGBColor(128, 0, 128)
  annotation.InteriorColor = PdfRGBColor(255, 255, 200)
  annotation.Border.Width = 2
  annotation.Border.Style = PdfBorderStyle.Dashed
  PdfAnnotationCollection.Create(page).Add(annotation)
新機能 — FileAttachment 注釈に対応しました。
fileSpecification = PdfFileSpecification("SalesReportChart.png", data)
  annotation = PdfFileAttachmentAnnotation(page, bounds, fileSpecification)
  annotation.Icon = PdfFileIcon.Graph
  annotation.Color = PdfRGBColor(Color.get_Teal())
  PdfAnnotationCollection.Create(page).Add(annotation)
新機能 — Movie 注釈に対応しました。
annotation = PdfMovieAnnotation(page, rect, "sample.wmv")
  annotation.Title = "My Movie Player"
  annotation.Movie.Poster = False
  annotation.Movie.Aspect = SizeF(16.0, 9.0)
  PdfAnnotationCollection.Create(page).Add(annotation)
新機能 — Screen 注釈に対応しました。
annotation = PdfScreenAnnotation(page, rect)
  annotation.Title = "ScreenWithBorder"
  annotation.Border.Width = 3.0
  annotation.Border.Style = PdfBorderStyle.Dashed
  PdfAnnotationCollection.Create(page).Add(annotation)
新機能 — RichMedia 注釈に対応しました。
annotation = PdfRichMediaAnnotation(page, rect, content)
  annotation.Content = PdfRichMediaContent()
  annotation.Color = PdfRGBColor(Color.get_Green())
  PdfAnnotationCollection.Create(page).Add(annotation)
新機能 — Widget 注釈に対応しました。
doc.LoadFromFile("widget.pdf")
  a = PdfAnnotationCollection.Create(page).get_Item(0)
  a.Characteristics.BackgroundColor
  a.Characteristics.BorderColor
  a.Flatten()
新機能 SPIREPDF-7101 PdfCode128ABarcode インターフェースによる Code 128 バーコードの描画に対応しました。
message = '0123456789'
Code128 = PdfCode128ABarcode(message)
Code128.BarcodeToTextGapHeight = 1.0
Code128.TextDisplayLocation = TextLocation.Bottom
Code128.TextColor = PdfRGBColor(Color.get_Blue())
Code128.Draw(page, PointF(0.0, y))
不具合修正 SPIREPDF-7291 PDF に添付ファイルを追加した後、添付ファイルを開けない問題を修正しました。
不具合修正 SPIREPDF-7923 テキストの置換に失敗する問題を修正しました。
不具合修正 SPIREPDF-7939 テキストを抽出する際に余分なスペースが含まれる問題を修正しました。
不具合修正 SPIREPDF-8119 PdfTextWidget インターフェースを使用してテキストを描画した際、位置が正しくならない問題を修正しました。
Spire.PDF for Python 12.9.4 のダウンロードはこちらをクリック: