ToJpeg
ToJpeg(Presentation, string)
Converts the input presentation to a set of JPEG format images. If the output file name is given as “myPath/myFilename.jpeg”, the result will be saved as a set of “myPath/myFilename_N.jpeg” files, where N is a slide number.
public static void ToJpeg(Presentation pres, string outputFileName)
| Parameter | Type | Description |
|---|
| pres | Presentation | The input presentation. |
| outputFileName | String | The output file name. |
Exceptions
| exception | condition |
|---|
| ArgumentException | |
Examples
using (var pres = new Presentation("pres.pptx"))
Convert.ToJpeg(pres, "presImage.jpeg");
See Also
ToJpeg(Presentation, string, Size)
Converts the input presentation to a set of JPEG format images. If the output file name is given as “myPath/myFilename.jpeg”, the result will be saved as a set of “myPath/myFilename_N.jpeg” files, where N is a slide number.
public static void ToJpeg(Presentation pres, string outputFileName, Size imageSize)
| Parameter | Type | Description |
|---|
| pres | Presentation | The input presentation |
| outputFileName | String | The output file name. |
| imageSize | Size | The size of each generated image. |
Exceptions
| exception | condition |
|---|
| ArgumentException | |
Examples
using (var pres = new Presentation("pres.pptx"))
Convert.ToJpeg(pres, "presImage.jpeg", new Size(720, 540));
See Also
ToJpeg(Presentation, string, float, IRenderingOptions)
Converts the input presentation to a set of JPEG format images. If the output file name is given as “myPath/myFilename.jpeg”, the result will be saved as a set of “myPath/myFilename_N.jpeg” files, where N is a slide number.
public static void ToJpeg(Presentation pres, string outputFileName, float scale,
IRenderingOptions options)
| Parameter | Type | Description |
|---|
| pres | Presentation | The input presentation. |
| outputFileName | String | The output file name. |
| scale | Single | The scaling factor applied to the output images relative to the original slide size. |
| options | IRenderingOptions | The rendering options. |
Exceptions
| exception | condition |
|---|
| ArgumentException | |
Examples
IRenderingOptions options = new RenderingOptions()
{
SlidesLayoutOptions = new NotesCommentsLayoutingOptions()
{
NotesPosition = NotesPositions.BottomTruncated
}
};
using (var pres = new Presentation("pres.pptx"))
Convert.ToJpeg(pres, "presImage.jpeg", 2f, options);
See Also