2
1

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 1 year has passed since last update.

C# PDF to Word

Last updated at Posted at 2019-04-17

PDFファイルはますます多くの人に使われています。しかし、PDFファイルのテキストとフォーマットの編集は難しいです。MS Wordはこれまで最も人気のあるワープロです。したがって、簡単に編集できるように、PDFファイルをワード形式に変換します。

Spire.PDFソフトウェアは開発者にC#プログラミングの方式を提供しており、NETプラットフォームでPDFファイルをwordに変換する機能を提供しています。この文章では、Spire.PDFを使ってPDF to word変換機能を実現する方法を紹介します。

すべてのコード:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using Spire.Pdf;

namespace PDF
{
    class Program
    {
        static void Main(string[] args)
        {
            // PDFをロード
            PdfDocument pdf = new PdfDocument();
            pdf.LoadFromFile("Sample.pdf");
            //Pdf to Word
            pdf.SaveToFile("Pdftoword.docx", FileFormat.DOCX);      
         }
    }
}

元PDFファイルのスクリーンショット:
SamplePDF.png

ワードドキュメントに変換した後の効果スクリーンショット:
PdftoWord.png

2
1
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
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?