'''' This code is part of Document Solutions for PDF .NET demos.'' Copyright (c) MESCIUS inc. All rights reserved.''ImportsSystem.IOImportsGrapeCity.Documents.Pdf PublicClassMakeLinearizedPublicFunctionCreatePDF(ByVal stream AsStream) AsInteger' Load an arbitrary non-linearized PDF into a GcPdfDocument:Using fs = File.OpenRead(Path.Combine("Resources", "PDFs", "CompleteJavaScriptBook.pdf"))Dim doc = NewGcPdfDocument() doc.Load(fs) ' Save the PDF as linearized: doc.Save(stream, SaveMode.Linearized) '' Done:Return doc.Pages.CountEndUsingEndFunctionEndClass