コード例 #1
0
        static void Main(string[] args)
        {
            // Create Bytescout.PDFExtractor.MultimediaExtractor instance
            MultimediaExtractor extractor = new MultimediaExtractor();

            extractor.RegistrationName = "demo";
            extractor.RegistrationKey  = "demo";

            // Load PDF document
            // (!) We do not provide the sample document, please load your own.
            extractor.LoadDocumentFromFile(@"sample-video.pdf");

            int i = 0;

            // Initialize movies enumeration
            if (extractor.GetFirstVideo())
            {
                do
                {
                    string outputFileName = "movie" + i + extractor.GetCurrentVideoExtension();

                    // Save movie to file
                    extractor.SaveCurrentVideoToFile(outputFileName);

                    i++;
                }while (extractor.GetNextVideo()); // Advance movies enumeration
            }

            // Cleanup
            extractor.Dispose();
        }
コード例 #2
0
        static void Main(string[] args)
        {
            // Create Bytescout.PDFExtractor.MultimediaExtractor instance
            MultimediaExtractor extractor = new MultimediaExtractor();

            extractor.RegistrationName = "demo";
            extractor.RegistrationKey  = "demo";

            // Load PDF document
            extractor.LoadDocumentFromFile(@".\audio.pdf");

            int i = 0;

            // Initialize sound clips enumeration
            if (extractor.GetFirstAudio())
            {
                do
                {
                    string outputFileName = "audio" + i + extractor.GetCurrentAudioExtension();

                    // Save sound clip to file
                    extractor.SaveCurrentAudioToFile(outputFileName);

                    i++;
                }while (extractor.GetNextAudio());                // Advance sounds enumeration
            }

            // Cleanup
            extractor.Dispose();
        }