Skip to content

Instantly share code, notes, and snippets.

@andruhovski
Created October 13, 2020 08:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andruhovski/9fdbca5fc9b2fb984c7d61c29d36e112 to your computer and use it in GitHub Desktop.
Save andruhovski/9fdbca5fc9b2fb984c7d61c29d36e112 to your computer and use it in GitHub Desktop.
Removing notes and separate images
private static void ConvertPDFtoPPTX(string inputFileName, string outputFileName)
{
var document = new Aspose.Pdf.Document(inputFileName);
foreach (var page in document.Pages)
{
RemoveAnnotations(page, Pdf.Annotations.AnnotationType.Ink);
RemoveAnnotations(page, Pdf.Annotations.AnnotationType.Square);
}
var options = new Aspose.Pdf.PptxSaveOptions
{
SeparateImages = true,
//CustomProgressHandler = ShowProgressOnConsole
};
document.Save(outputFileName, options);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment