@@ -15,9 +15,12 @@ Refer to the following code snippet to extract the images from a PDF page.
1515
1616{% highlight c# tabtitle="C# [ Cross-platform] " playgroundButtonLink="https://raw.githubusercontent.com/SyncfusionExamples/PDF-Examples/master/Image%20Extraction/Extract-images-from-a-PDF-pages/.NET/Extract-images-from-a-PDF-pages/Program.cs " %}
1717
18- //Load an existing PDF
19- FileStream docStream = new FileStream("Input.pdf", FileMode.Open, FileAccess.Read);
20- PdfLoadedDocument loadedDocument = new PdfLoadedDocument(docStream);
18+ using Syncfusion.Pdf;
19+ using Syncfusion.Pdf.Exporting;
20+ using Syncfusion.Pdf.Parsing;
21+
22+ //Load the PDF document.
23+ PdfLoadedDocument loadedDocument = new PdfLoadedDocument("Input.pdf");
2124//Load the first page
2225PdfPageBase pageBase = loadedDocument.Pages[ 0] ;
2326
@@ -30,8 +33,12 @@ loadedDocument.Close(true);
3033
3134{% highlight c# tabtitle="C# [ Windows-specific] " %}
3235
36+ using Syncfusion.Pdf;
37+ using Syncfusion.Pdf.Exporting;
38+ using Syncfusion.Pdf.Parsing;
39+
3340//Load an existing PDF
34- PdfLoadedDocument loadedDocument = new PdfLoadedDocument(fileName );
41+ PdfLoadedDocument loadedDocument = new PdfLoadedDocument("Input.pdf" );
3542//Load the first page
3643PdfPageBase pageBase = loadedDocument.Pages[ 0] ;
3744
@@ -44,8 +51,12 @@ loadedDocument.Close(true);
4451
4552{% highlight vb.net tabtitle="VB.NET [ Windows-specific] " %}
4653
54+ Imports Syncfusion.Pdf
55+ Imports Syncfusion.Pdf.Exporting
56+ Imports Syncfusion.Pdf.Parsing
57+
4758'Load an existing PDF
48- Dim loadedDocument As New PdfLoadedDocument(fileName )
59+ Dim loadedDocument As New PdfLoadedDocument("Input.pdf" )
4960'Load the first page
5061Dim pageBase As PdfPageBase = loadedDocument.Pages(0)
5162
@@ -72,9 +83,13 @@ Refer to the following code snippet to extract the image info from a PDF page.
7283
7384{% highlight c# tabtitle="C# [ Cross-platform] " playgroundButtonLink="https://raw.githubusercontent.com/SyncfusionExamples/PDF-Examples/master/Image%20Extraction/Extract-the-image-info-from-a-PDF-page/.NET/Extract-the-image-info-from-a-PDF-page/Program.cs " %}
7485
75- //Load an existing PDF
76- FileStream docStream = new FileStream("Input.pdf", FileMode.Open, FileAccess.Read);
77- PdfLoadedDocument loadedDocument = new PdfLoadedDocument(docStream);
86+ using Syncfusion.Drawing;
87+ using Syncfusion.Pdf;
88+ using Syncfusion.Pdf.Exporting;
89+ using Syncfusion.Pdf.Parsing;
90+
91+ //Load the PDF document.
92+ PdfLoadedDocument loadedDocument = new PdfLoadedDocument("Input.pdf");
7893//Load the first page
7994PdfPageBase pageBase = loadedDocument.Pages[ 0] ;
8095
@@ -87,8 +102,13 @@ loadedDocument.Close(true);
87102
88103{% highlight c# tabtitle="C# [ Windows-specific] " %}
89104
105+ using System.Drawing;
106+ using Syncfusion.Pdf;
107+ using Syncfusion.Pdf.Exporting;
108+ using Syncfusion.Pdf.Parsing;
109+
90110//Load an existing PDF
91- PdfLoadedDocument loadedDocument = new PdfLoadedDocument(fileName );
111+ PdfLoadedDocument loadedDocument = new PdfLoadedDocument("Input.pdf" );
92112//Load the first page
93113PdfPageBase pageBase = loadedDocument.Pages[ 0] ;
94114
@@ -101,8 +121,13 @@ loadedDocument.Close(true);
101121
102122{% highlight vb.net tabtitle="VB.NET [ Windows-specific] " %}
103123
124+ Imports System.Drawing
125+ Imports Syncfusion.Pdf
126+ Imports Syncfusion.Pdf.Exporting
127+ Imports Syncfusion.Pdf.Parsing
128+
104129'Load an existing PDF
105- Dim loadedDocument As New PdfLoadedDocument(fileName )
130+ Dim loadedDocument As New PdfLoadedDocument("Input.pdf" )
106131'Load the first page
107132Dim pageBase As PdfPageBase = loadedDocument.Pages(0)
108133
@@ -125,6 +150,9 @@ The following code example illustrates how to extract images from an entire PDF
125150
126151{% highlight c# tabtitle="C# [ Cross-platform] " playgroundButtonLink="https://raw.githubusercontent.com/SyncfusionExamples/PDF-Examples/master/Image%20Extraction/Extract-images-from-PDF-documents/.NET/Extract-images-from-PDF-documents/Program.cs " %}
127152
153+ using Syncfusion.Pdf.Parsing;
154+ using System.IO;
155+
128156//Get stream from an existing PDF document.
129157FileStream inputStream = new FileStream(@"Input.pdf", FileMode.Open, FileAccess.Read);
130158//Initialize the PDF document extractor.
@@ -144,6 +172,9 @@ documentExtractor.Dispose();
144172
145173{% highlight c# tabtitle="C# [ Windows-specific] " %}
146174
175+ using Syncfusion.Pdf.Parsing;
176+ using System.IO;
177+
147178//Get stream from an existing PDF document.
148179FileStream inputStream = new FileStream(@"Input.pdf", FileMode.Open, FileAccess.Read);
149180//Initialize the PDF document extractor.
@@ -163,6 +194,9 @@ documentExtractor.Dispose();
163194
164195{% highlight vb.net tabtitle="VB.NET [ Windows-specific] " %}
165196
197+ Imports Syncfusion.Pdf.Parsing
198+ Imports System.IO
199+
166200'Get stream from an existing PDF document.
167201Dim inputStream As FileStream = New FileStream("Input.pdf", FileMode.Open, FileAccess.Read)
168202'Initialize the PDF document extractor.
0 commit comments