0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

C# PDFドキュメントをOFDに変換

Posted at

OFDファイルは、Cypresslogic Systems Inc.によって開発されたObjectView Form Definitionです。OFDは、一般的にObjectView Form Definitionファイルに関連付けられているファイル拡張子です。今日は、C#でFree.Spire.PDFを使ってPDFドキュメントをOFDに変換に変換する方法を紹介します。

下準備

1.E-iceblueの公式サイトからFree Spire.PDF無料版をダウンロードしてください。

f:id:lendoris:20210908152135p:plain

 

2.Visual Studioを起動して新規プロジェクトを作成してから、インストールされたファイルにあった相応しいSpire. PDF.dllを参照に追加してください。
(Net 4.0を例としたら、デフォルトパスは“Bin→NET4.0→PDF.dll”というようです。)

f:id:lendoris:20210908152142p:plain

```C# using Spire.Pdf;

namespace PDFtoOFD
{
class Program
{
static void Main(string[] args)
{
PdfDocument pdf = new PdfDocument();
pdf.LoadFromFile("test.pdf");
pdf.SaveToFile("ToOFD.ofd", FileFormat.OFD);
}
}
}

</blockquote>

<h4><strong>実行結果</strong></h4>
<p><img src="https://cdn-ak.f.st-hatena.com/images/fotolife/l/lendoris/20210908/20210908152221.png" alt="f:id:lendoris:20210908152221p:plain" width="554" height="599" loading="lazy" title="" class="hatena-fotolife" itemprop="image" /></p>
<p style="margin: 0px; font-family: 'Helvetica Neue', Helvetica, Arial, 'ヒラギノ角ゴ Pro W3', 'Hiragino Kaku Gothic Pro', メイリオ, Meiryo, 'MS Pゴシック', 'MS PGothic', sans-serif; line-height: 1.6; color: #000001; overflow-wrap: break-word; padding: 0px;"> </p>
0
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?