RemoveAllImages.vb
C# VB
'''' This code is part of Document Solutions for PDF .NET demos.'' Copyright (c) MESCIUS inc. All rights reserved.''Imports System.IOImports GrapeCity.Documents.Pdf
Public Class RemoveAllImages Public Function CreatePDF(ByVal stream As Stream) As Integer Using fs = File.OpenRead(Path.Combine("Resources", "PDFs", "Wetlands.pdf")) Dim doc = New GcPdfDocument() doc.Load(fs) ' Get the list of images in the document: Dim imageInfos = doc.GetImages() ' Remove all images: doc.RemoveImages(imageInfos) '' Done: doc.Save(stream) Return doc.Pages.Count End Using End FunctionEnd Class