Aspose.Imaging.Examples.CSharp.ModifyingAndConvertingImages.DjVu.ConvertDjVuToPDF.Run C# (CSharp) Метод

Run() публичный статический Метод

public static Run ( ) : void
Результат void
        public static void Run()
        {
            // ExStart:ConvertDjVuToPDF
            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir_DjVu();

            // Load a DjVu image
            using (DjvuImage image = (DjvuImage)Image.Load(dataDir + "Sample.djvu"))
            {
                // Create an instance of PdfOptions and Initialize the metadata for Pdf document
                PdfOptions exportOptions = new PdfOptions();
                exportOptions.PdfDocumentInfo = new PdfDocumentInfo();
                
                // Create an instance of IntRange and initialize it with the range of DjVu pages to be exported
                IntRange range = new IntRange(0, 5); // Export first 5 pages

                // Initialize an instance of DjvuMultiPageOptions with range of DjVu pages to be exported and Save the result in PDF format
                exportOptions.MultiPageOptions = new DjvuMultiPageOptions(range);
                image.Save(dataDir + "ConvertDjVuToPDFFormat_out.pdf", exportOptions);
            }
            // ExEnd:ConvertDjVuToPDF
        }
    }
ConvertDjVuToPDF