チュートリアル
簡単にライブラリーを使用するためのチュートリアルコレクション
時々、あらかじめ作成された画像ファイルのセットから PowerPoint 文書を作成する必要があります。 たとえば、会社から素敵なチラシが提供され、それらを1つの PowerPoint 文書にまとめて、各画像を整然と表示する必要があります。この記事では、Spire.Presentation for .NET を使用して画像ファイル(PNG、JPG、BMP など)を PowerPoint に変換する方法について説明します。
まず、Spire.Presentation for .NET パッケージに含まれている DLL ファイルを .NET プロジェクトの参照として追加する必要があります。DLL ファイルは、このリンクからダウンロードするか、NuGet を介してインストールできます。
PM> Install-Package Spire.Presentation
PowerPoint の各スライドの背景として画像が変換される場合、それらは移動や拡大縮小ができません。以下は、Spire.Presentation for .NET を使用して、画像を PowerPoint ファイルに背景画像として変換する手順です。
using Spire.Presentation;
using Spire.Presentation.Drawing;
using System.Drawing;
using System.IO;
namespace ConvertImageToBackground
{
class Program
{
static void Main(string[] args)
{
//Presentationオブジェクトを作成する
Presentation presentation = new Presentation();
//スライドのサイズの種類を設定する
presentation.SlideSize.Type = SlideSizeType.Screen16x9;
//デフォルトのスライドを削除する
presentation.Slides.RemoveAt(0);
//ファイルパスを文字列配列で取得する
string[] picFiles = Directory.GetFiles(@"C:\Users\Administrator\Desktop\Images");
//画像をループする
for (int i = 0; i < picFiles.Length; i++)
{
//スライドを追加する
ISlide slide = presentation.Slides.Append();
//特定の画像を取得する
string imageFile = picFiles[i];
Image image = Image.FromFile(imageFile);
//画像コレクションに追加する
IImageData imageData = presentation.Images.Append(image);
//画像をスライドの背景画像として設定する
slide.SlideBackground.Type = BackgroundType.Custom;
slide.SlideBackground.Fill.FillType = FillFormatType.Picture;
slide.SlideBackground.Fill.PictureFill.FillType = PictureFillType.Stretch;
slide.SlideBackground.Fill.PictureFill.Picture.EmbedImage = imageData;
}
//結果文書を保存する
presentation.SaveToFile("ImagesToBackground.pptx", FileFormat.Pptx2013);
}
}
}
PowerPoint ファイルで画像を移動可能かつサイズ変更可能にしたい場合は、それらを図形として変換することができます。以下は、Spire.Presentation for .NET を使用して PowerPoint 文書内の画像を図形に変換する手順です。
using Spire.Presentation;
using Spire.Presentation.Drawing;
using System.Drawing;
using System.IO;
namespace ConvertImageToShape
{
class Program
{
static void Main(string[] args)
{
//Presentationオブジェクトを作成する
Presentation presentation = new Presentation();
//スライドのサイズの種類を設定する
presentation.SlideSize.Type = SlideSizeType.Screen16x9;
//デフォルトのスライドを削除する
presentation.Slides.RemoveAt(0);
//ファイルパスを文字列配列で取得する
string[] picFiles = Directory.GetFiles(@"C:\Users\Administrator\Desktop\Images");
//画像をループする
for (int i = 0; i < picFiles.Length; i++)
{
//スライドを追加する
ISlide slide = presentation.Slides.Append();
//特定の画像を取得する
string imageFile = picFiles[i];
Image image = Image.FromFile(imageFile);
//画像コレクションに追加する
IImageData imageData = presentation.Images.Append(image);
//スライドと同じサイズの図形を追加する
IAutoShape shape = slide.Shapes.AppendShape(ShapeType.Rectangle, new RectangleF(new PointF(0, 0), presentation.SlideSize.Size));
//図形を画像で塗りつぶす
shape.Line.FillType = FillFormatType.None;
shape.Fill.FillType = FillFormatType.Picture;
shape.Fill.PictureFill.FillType = PictureFillType.Stretch;
shape.Fill.PictureFill.Picture.EmbedImage = imageData;
}
//結果文書を保存する
presentation.SaveToFile("ImageToShape.pptx", FileFormat.Pptx2013);
}
}
}
もし画像のアスペクト比が 16:9 ではない場合や、標準のスライドサイズでない場合は、画像の実際のサイズに基づいてスライドを作成することができます。これにより、画像が過度に伸びたり圧縮されたりするのを防ぐことができます。以下は、Spire.Presentation for .NET を使用してカスタマイズされたスライドサイズで PowerPoint 文書に画像を変換する手順です。
using Spire.Pdf.Graphics;
using Spire.Presentation;
using Spire.Presentation.Drawing;
using System.Drawing;
using System.IO;
namespace CustomSlideSize
{
class Program
{
static void Main(string[] args)
{
//Presentationオブジェクトを作成する
Presentation presentation = new Presentation();
//デフォルトのスライドを削除する
presentation.Slides.RemoveAt(0);
//ファイルパスを文字列配列で取得する
string[] picFiles = Directory.GetFiles(@"C:\Users\Administrator\Desktop\Image");
//PdfUnitConvertor オブジェクトを作成する
PdfUnitConvertor convertor = new PdfUnitConvertor();
//画像をループする
for (int i = 0; i < picFiles.Length; i++)
{
//特定の画像を取得する
string imageFile = picFiles[i];
Image image = Image.FromFile(imageFile);
//画像コレクションに追加する
IImageData imageData = presentation.Images.Append(image);
//画像の高さと幅をピクセル単位で取得する
int height = imageData.Height;
int width = imageData.Width;
//ピクセルをポイントに変換する
float widthPoint = convertor.ConvertUnits(width, PdfGraphicsUnit.Pixel, PdfGraphicsUnit.Point);
float heightPoint= convertor.ConvertUnits(height, PdfGraphicsUnit.Pixel, PdfGraphicsUnit.Point);
//スライドのサイズを設定する
presentation.SlideSize.Size = new SizeF(widthPoint, heightPoint);
//スライドを追加する
ISlide slide = presentation.Slides.Append();
//画像をスライドの背景画像として設定する
slide.SlideBackground.Type = BackgroundType.Custom;
slide.SlideBackground.Fill.FillType = FillFormatType.Picture;
slide.SlideBackground.Fill.PictureFill.FillType = PictureFillType.Stretch;
slide.SlideBackground.Fill.PictureFill.Picture.EmbedImage = imageData;
}
//結果文書を保存する
presentation.SaveToFile("CustomizeSlideSize.pptx", FileFormat.Pptx2013);
}
}
}
結果ドキュメントから評価メッセージを削除したい場合、または機能制限を取り除く場合は、についてこのメールアドレスはスパムボットから保護されています。閲覧するにはJavaScriptを有効にする必要があります。にお問い合わせ、30 日間有効な一時ライセンスを取得してください。
ODP ファイルは、画像、テキスト、メディア、およびトランジション効果を含むスライドで構成される OpenDocument Presentation ファイルです。このファイルは OpenOffice Impress、LibreOffice Impress、Microsoft PowerPoint などの指定されたプログラムでのみ開くことができますので、ODP ファイルをより多くのデバイスで閲覧可能にしたい場合は、PDF に変換することができます。この記事では、Spire.Presentation for .NET を使用して ODP ファイル PDF に変換する方法を示します。
まず、Spire.Presentation for .NET パッケージに含まれている DLL ファイルを .NET プロジェクトの参照として追加する必要があります。DLL ファイルは、このリンクからダウンロードするか、NuGet を介してインストールできます。
PM> Install-Package Spire.Presentation
Spire.Presentation for .NET は、Presentation.LoadFromFile() メソッドを呼び出すことで ODP ファイルを PDF 形式で保存することができます。以下に、詳細な手順を示します。
using Spire.Presentation;
namespace ODPtoPDF
{
class Program
{
static void Main(string[] args)
{
//Presentation インスタンスを作成する
Presentation presentation = new Presentation();
//サンプル ODP ファイルをロードする
presentation.LoadFromFile("Sample.odp", FileFormat.ODP);
// ODPファイルをPDFとして保存する
presentation.SaveToFile("ODPtoPDF.pdf", FileFormat.PDF);
presentation.Dispose();
}
}
}
Imports Spire.Presentation
Namespace ODPtoPDF
Class Program
Private Shared Sub Main(ByVal args As String())
'Presentation インスタンスを作成する
Dim presentation As Presentation = New Presentation()
'サンプル ODP ファイルをロードする
presentation.LoadFromFile("Sample.odp", FileFormat.ODP)
' ODPファイルをPDFとして保存する
presentation.SaveToFile("ODPtoPDF.pdf", FileFormat.PDF)
presentation.Dispose()
End Sub
End Class
End Namespace
結果ドキュメントから評価メッセージを削除したい場合、または機能制限を取り除く場合は、についてこのメールアドレスはスパムボットから保護されています。閲覧するにはJavaScriptを有効にする必要があります。にお問い合わせ、30 日間有効な一時ライセンスを取得してください。
他人がオンラインで共有する PowerPoint ドキュメントを使用するには、表示する前にパソコンにダウンロードする必要があります。しかし、プレゼンテーションが非常に大きい場合、ダウンロードプロセスは非常に煩雑で時間がかかります。PowerPoint を HTML に変換するのは、オンラインで直接プレゼンテーションを見るための良い解決策です。この記事では、Spire.Presentation for .NET を使用して、C# および VB.NET で PowerPoint を HTML に変換する方法を示します。
まず、Spire.Presentation for .NET パッケージに含まれている DLL ファイルを .NET プロジェクトの参照として追加する必要があります。DLL ファイルは、このリンクからダウンロードするか、NuGet を介してインストールできます。
PM> Install-Package Spire.Presentation
Spire.Presentation for .NET では、Presentation.SaveToFile(string, FileFormat) メソッドを使用して、PowerPoint プレゼンテーションを PDF、XPS、HTML などの他のファイル形式に変換します。次の手順では、Spire.Presentation for .NET を使用して PowerPoint プレゼンテーションを HTML に変換する方法を示します。
using Spire.Presentation;
namespace ConvertPowerPointToHtml
{
class Program
{
static void Main(string[] args)
{
//Presentationクラスのインスタンスを初期化する
Presentation ppt = new Presentation();
//PowerPointプレゼンテーションをロードする
ppt.LoadFromFile(@"sample.pptx");
//HTMLを出力するファイルパスを指定する
string result = @"D:\output\PowerPointToHtml.html";
//PowerPointプレゼンテーションをHTML形式で保存する
ppt.SaveToFile(result, FileFormat.Html);
}
}
}
Imports Spire.Presentation
Namespace ConvertPowerPointToHtml
Friend Class Program
Private Shared Sub Main(ByVal args As String())
'Presentationクラスのインスタンスを初期化する
Dim ppt As Presentation = New Presentation()
'PowerPointプレゼンテーションをロードする
ppt.LoadFromFile("sample.pptx")
'HTMLを出力するファイルパスを指定する
Dim result = "D:\output\PowerPointToHtml.html "
'PowerPointプレゼンテーションをHTML形式で保存する
ppt.SaveToFile(result, FileFormat.Html)
End Sub
End Class
End Namespace
場合によっては、プレゼンテーション全体ではなく、特定のスライドを HTML に変換する必要があります。Spire.Presentation は、PowerPoint スライドを HTML に変換する ISlide.SaveToFile(string, FileFormat) メソッドを提供しています。詳細な手順は次のとおりです。
using Spire.Presentation;
using System;
namespace ConvertPowerPointSlideToHtml
{
class Program
{
static void Main(string[] args)
{
//Presentationクラスのインスタンスを初期化する
Presentation presentation = new Presentation();
//PowerPointプレゼンテーションをロードする
presentation.LoadFromFile(@"sample.pptx");
//最初のスライドを取得する
ISlide slide = presentation.Slides[0];
//HTMLを出力するファイルパスを指定する
String result = @"D:\output\SlideToHtml.html";
//最初のスライドをHTML形式で保存する
slide.SaveToFile(result, FileFormat.Html);
}
}
}
Imports Spire.Presentation
Namespace ConvertPowerPointSlideToHtml
Friend Class Program
Private Shared Sub Main(ByVal args As String())
'Presentationクラスのインスタンスを初期化する
Dim presentation As Presentation = New Presentation()
' PowerPointプレゼンテーションをロードする
presentation.LoadFromFile("sample.pptx")
'最初のスライドを取得する
Dim slide As ISlide = presentation.Slides(0)
'HTMLを出力するファイルパスを指定する
Dim result = "D:\output\SlideToHtml.html "
'最初のスライドをHTML形式で保存する
slide.SaveToFile(result, FileFormat.Html)
End Sub
End Class
End Namespace
結果ドキュメントから評価メッセージを削除したい場合、または機能制限を取り除く場合は、についてこのメールアドレスはスパムボットから保護されています。閲覧するにはJavaScriptを有効にする必要があります。にお問い合わせ、30 日間有効な一時ライセンスを取得してください。
さまざまな目的で、PowerPoint を画像に変換する必要があります。 たとえば、他のユーザーが PowerPoint ドキュメントの内容を編集できないようにします、PowerPoint ドキュメントのサムネイルを生成します、ソーシャル メディアで PowerPoint ドキュメントを共有します。この記事では、Spire.Presentation for .NET を使用して、C# および VB.NET で PowerPoint を画像に変換する方法を示します。
まず、Spire.Presentation for .NET パッケージに含まれている DLL ファイルを .NET プロジェクトの参照として追加する必要があります。DLL ファイルは、このリンクからダウンロードするか、NuGetを介してインストールできます。
PM> Install-Package Spire.Presentation
Spire.Presentation for .NET が提供する ISlide.SaveAsImage() メソッドでは、スライドを PNG または JPG に変換することがサポートします。以下に詳細な変換手順を示します。
using Spire.Presentation;
using System.Drawing;
namespace ConvertPowerPointToJpgOrPngImage
{
class Program
{
static void Main(string[] args)
{
//Presentationクラスのインスタンスを初期化する
Presentation presentation = new Presentation();
//PowerPointドキュメントをロードする
presentation.LoadFromFile(@"Sample.pptx");
int i = 0;
//すべてのスライドをループする
foreach(ISlide slide in presentation.Slides)
{
//画像オブジェクトをPNGとして保存する
Image image = slide.SaveAsImage();
string fileName = string.Format("ToImage-img-{0}.png", i);
image.Save(fileName, System.Drawing.Imaging.ImageFormat.Png);
i++;
}
}
}
}
Imports Spire.Presentation
Namespace ConvertPowerPointToJpgOrPngImage
Friend Class Program
Private Shared Sub Main(ByVal args As String())
'Presentationクラスのインスタンスを初期化する
Dim presentation As Presentation = New Presentation()
'PowerPointドキュメントをロードする
presentation.LoadFromFile("Sample.pptx")
Dim i = 0
'すべてのスライドをループする
For Each slide As ISlide In presentation.Slides
'画像をPNGとして保存する
Dim image As Image = slide.SaveAsImage()
Dim fileName = String.Format("ToImage-img-{0}.png", i)
image.Save(fileName, Drawing.Imaging.ImageFormat.Png)
i += 1
Next
End Sub
End Class
End Namespace
Spire.Presentation for .NET が提供する Presentation.SaveToFile(string, FileFormat) メソッドでは、PowerPoint を TIFF に変換することがサポートします。以下に詳細な変換手順を示します。
using Spire.Presentation;
namespace ConvertPowerPointToTiffImage
{
class Program
{
static void Main(string[] args)
{
//Presentationクラスのインスタンスを初期化する
Presentation presentation = new Presentation();
//PowerPointドキュメントをロードする
presentation.LoadFromFile(@"Sample.pptx");
//画像をTIFFとして保存する
presentation.SaveToFile("toTIFF.tiff", FileFormat.Tiff);
}
}
}
Imports Spire.Presentation
Namespace ConvertPowerPointToTiffImage
Friend Class Program
Private Shared Sub Main(ByVal args As String())
'Presentationクラスのインスタンスを初期化する
Dim presentation As Presentation = New Presentation()
'PowerPointドキュメントをロードする
presentation.LoadFromFile("Sample.pptx")
'画像をTIFFとして保存する
presentation.SaveToFile("toTIFF.tiff", FileFormat.Tiff)
End Sub
End Class
End Namespace
Spire.Presentation for .NET が提供する ISlide.SaveAsEMF() メソッドでは、スライドを EMF に変換することがサポートします。以下に詳細な変換手順を示します。
using Spire.Presentation;
namespace ConvertPowerPointToEmfImage
{
class Program
{
static void Main(string[] args)
{
//Presentationクラスのインスタンスを初期化する
Presentation presentation = new Presentation();
//PowerPointドキュメントをロードする
presentation.LoadFromFile(@"Sample.pptx");
int i = 0;
//すべてのスライドをループする
foreach (ISlide slide in presentation.Slides)
{
string fileName = string.Format("ToEmf-{0}.emf", i);
//各スライドをEMFとして保存する
slide.SaveAsEMF(fileName);
//各スライドを指定した幅と高さのEMFとして保存する
//slide.SaveAsEMF(fileName, 1075, 710);
i++;
}
}
}
}
Imports Spire.Presentation
Namespace ConvertPowerPointToEmfImage
Friend Class Program
Private Shared Sub Main(ByVal args As String())
'Presentationクラスのインスタンスを初期化する
Dim presentation As Presentation = New Presentation()
'PowerPointドキュメントをロードする
presentation.LoadFromFile("Sample.pptx")
Dim i = 0
'すべてのスライドをループする
For Each slide As ISlide In presentation.Slides
Dim fileName = String.Format("ToEmf-{0}.emf", i)
'各スライドをEMFとして保存する
slide.SaveAsEMF(fileName)
'各スライドを指定した幅と高さのEMFとして保存する
'slide.SaveAsEMF(fileName, 1075, 710);
i += 1
Next
End Sub
End Class
End Namespace
Spire.Presentation for .NET が提供する Presentation.SaveToSVG() メソッドは、PowerPoint を SVG に変換することができます。以下に詳細な変換手順を示します。
using Spire.Presentation;
using System.Collections.Generic;
using System.IO;
namespace ConvertPowerPointToSvgImage
{
class Program
{
static void Main(string[] args)
{
//Presentationクラスのインスタンスを初期化する
Presentation presentation = new Presentation();
//PowerPointドキュメントをロードする
presentation.LoadFromFile(@"Sample.pptx");
//PowerPointをSVGに変換し、結果をバイト配列キューに保存する
Queue svgBytes = presentation.SaveToSVG();
int count = svgBytes.Count;
//キュー内のバイト配列をループする
for (int i = 0; i < count; i++)
{
//キューの先頭にあるバイト配列を削除して返する
byte[] bt = svgBytes.Dequeue();
//出力ファイル名を指定する
string fileName = string.Format("ToSVG-{0}.svg", i);
//FileStreamインスタンスを作成する
FileStream fs = new FileStream(fileName, FileMode.Create);
//SVGファイルへのバイト配列を保存する
fs.Write(bt, 0, bt.Length);
}
}
}
}
Imports Spire.Presentation
Imports System.Collections.Generic
Imports System.IO
Namespace ConvertPowerPointToSvgImage
Friend Class Program
Private Shared Sub Main(ByVal args As String())
'Presentationクラスのインスタンスを初期化する
Dim presentation As Presentation = New Presentation()
'PowerPointドキュメントをロードする
presentation.LoadFromFile("Sample.pptx")
'PowerPointをSVGに変換し、結果をバイト配列キューに保存する
Dim svgBytes As Queue(Of Byte()) = presentation.SaveToSVG()
Dim count = svgBytes.Count
'キュー内のバイト配列をループする
For i = 0 To count - 1
'キューの先頭にあるバイト配列を削除して返する
Dim bt As Byte() = svgBytes.Dequeue()
'出力ファイル名を指定する
Dim fileName = String.Format("ToSVG-{0}.svg", i)
'FileStreamインスタンスを作成する
Dim fs As FileStream = New FileStream(fileName, FileMode.Create)
'SVGファイルへのバイト配列を保存する
fs.Write(bt, 0, bt.Length)
Next
End Sub
End Class
End Namespace
結果ドキュメントから評価メッセージを削除したい場合、または機能制限を取り除く場合は、についてこのメールアドレスはスパムボットから保護されています。閲覧するにはJavaScriptを有効にする必要があります。にお問い合わせ、30 日間有効な一時ライセンスを取得してください。
XML Paper Specification (XPS) ドキュメント形式は、XML に基づいてデジタル文書の電子表現です。ドキュメントの内容やデザインをコンピュータ上で完全に維持するページ分けの固定レイアウト形式です。印刷や共有を容易にするために PowerPoint ドキュメントを XPS に変換する必要がある場合があります。この記事では、Spire.Presentation for .NET を使用して、C# および VB.NET で PowerPoint を XPS に変換する方法を示します。
まず、Spire.Presentation for .NET パッケージに含まれている DLL ファイルを .NET プロジェクトの参照として追加する必要があります。DLL ファイルは、このリンクからダウンロードするか、NuGetを介してインストールできます。
PM> Install-Package Spire.Presentation
Spire.Presentation for .NET が提供する Presentation.SaveToFile(string,FileFormat) メソッドは、PowerPoint ドキュメントを XPS ドキュメントとして保存することをサポートします。詳細な変換の手順は次のとおりです。
using Spire.Presentation;
namespace PowerPointtoXPS
{
class Program
{
static void Main(string[] args)
{
//Presentationインスタンスを作成する
Presentation presentation = new Presentation();
//サンプル・ドキュメントをロードする
presentation.LoadFromFile("test.pptx");
//PowerPointドキュメントをXPSに保存する
presentation.SaveToFile("toXPS.xps", FileFormat.XPS);
}
}
}
Imports Spire.Presentation
Namespace PowerPointtoPDF
Class Program
Private Shared Sub Main(ByVal args As String())
'Presentationインスタンスを作成する
Dim presentation As Presentation = New Presentation()
'サンプル・ドキュメントをロードする
presentation.LoadFromFile("test.pptx")
'PowerPointドキュメントをXPSに保存する
presentation.SaveToFile("toXPS.xps", FileFormat.XPS)
End Sub
End Class
End Namespace
結果ドキュメントから評価メッセージを削除したい場合、または機能制限を取り除く場合は、についてこのメールアドレスはスパムボットから保護されています。閲覧するにはJavaScriptを有効にする必要があります。にお問い合わせ、30 日間有効な一時ライセンスを取得してください。
PDF ファイルは、特定のビューアを必要とせずに、ほとんどのアプリケーションで表示できるなど、ドキュメント共有の面で多くの利点があります。さらに、受信者が使用するソフトウェアやシステムに影響されることなく、作成者が適用するすべてのフォーマットを保持することができます。
PowerPoint プレゼンテーションをクロスプラットフォームで可能な限り多くのデバイスで読めるようにするには、PDF に変換するのが最適な方法です。この記事では、Spire.Presentation for .NET を使用して、C# および VB.NET で PowerPoint プレゼンテーションを PDF に変換する方法を示します。
まず、Spire.Presentation for .NET パッケージに含まれている DLL ファイルを .NET プロジェクトの参照として追加する必要があります。DLL ファイルは、このリンクからダウンロードするか、NuGet を介してインストールできます。
PM> Install-Package Spire.Presentation
次の手順は、Spire.Presentation for .NET を使用して PowerPoint プレゼンテーション全体を PDF に変換する方法を示しています。
using Spire.Presentation;
namespace ConvertPowerPointToPdf
{
class Program
{
static void Main(string[] args)
{
// Presentationクラスのオブジェクトを作成する
Presentation ppt = new Presentation();
// PowerPointプレゼンテーションをロードする
ppt.LoadFromFile(@"sample.pptx");
//ファイルをPDFとして保存する
ppt.SaveToFile("output1.pdf", FileFormat.PDF);
}
}
}
Imports Spire.Presentation
Namespace ConvertPowerPointToPdf
Friend Class Program
Private Shared Sub Main(ByVal args As String())
' Presentationクラスのオブジェクトを作成する
Dim ppt As Presentation = New Presentation()
' PowerPointプレゼンテーションをロードする
ppt.LoadFromFile("sample.pptx")
'ファイルをPDFとして保存する
ppt.SaveToFile("output1.pdf", FileFormat.PDF)
End Sub
End Class
End Namespace
次の手順は、Spire.Presentation for .NET を使用して PowerPoint プレゼンテーションの特定のスライドを PDF に変換する方法を示しています。
using Spire.Presentation;
namespace ConvertSlidesToPdf
{
class Program
{
static void Main(string[] args)
{
//Presentationクラスのオブジェクトを作成する
Presentation ppt = new Presentation();
// PowerPointプレゼンテーションをロードする
ppt.LoadFromFile(@"sample.pptx");
// 2枚目のスライドを取得する
ISlide slide = ppt.Slides[1];
//スライドをPDFとして保存する
slide.SaveToFile("output2.pdf", FileFormat.PDF);
}
}
}
Imports Spire.Presentation
Namespace ConvertSlidesToPdf
Friend Class Program
Private Shared Sub Main(ByVal args As String())
'Presentationクラスのオブジェクトを作成する
Dim ppt As Presentation = New Presentation()
' PowerPointプレゼンテーションをロードする
ppt.LoadFromFile("sample.pptx")
'2枚目のスライドを取得する
Dim slide As ISlide = ppt.Slides(1)
'スライドをPDFとして保存する
slide.SaveToFile("output2.pdf", FileFormat.PDF)
End Sub
End Class
End Namespace
結果ドキュメントから評価メッセージを削除したい場合、または機能制限を取り除く場合は、についてこのメールアドレスはスパムボットから保護されています。閲覧するにはJavaScriptを有効にする必要があります。 にお問い合わせ、30 日間有効な一時ライセンスを取得してください。