You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//Due to platform limitations, Essential<sup>®</sup> PDF supports splitting a PDF file into individual pages only in Windows Forms, WPF, ASP.NET, and ASP.NET MVC platforms. However this can be achieved by using the following code snippet.
26
+
using Syncfusion.Pdf;
27
+
using Syncfusion.Pdf.Parsing;
27
28
28
29
//Load the PDF document
29
-
FileStream docStream = new FileStream("Input.pdf", FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
30
-
PdfLoadedDocument loadedDocument = new PdfLoadedDocument(docStream, true);
31
-
for (int i = 0; i < loadedDocument.Pages.Count; i++)
32
-
{
33
-
//Creates a new document.
34
-
PdfDocument document = new PdfDocument();
35
-
//Imports the pages from the loaded document.
36
-
document.ImportPage(loadedDocument, i);
37
-
38
-
//Create a File stream.
39
-
using (var outputFileStream = new FileStream("Output" + i + ".pdf", FileMode.Create, FileAccess.Write)) {
40
-
//Save the document to stream.
41
-
document.Save(outputFileStream);
42
-
}
43
-
//Close the document.
44
-
document.Close(true);
45
-
}
30
+
PdfLoadedDocument loadedDocument = new PdfLoadedDocument("Input.pdf");
Copy file name to clipboardExpand all lines: Document-Processing/Word/Word-Processor/angular/how-to/export-document-as-pdf.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,8 +17,9 @@ In this article, we are going to see how to export the document as PDF format. Y
17
17
Use [`pdf export component`](https://www.npmjs.com/package/@syncfusion/ej2-pdf-export) in application level to export the document as pdf using [`exportAsImage`](https://ej2.syncfusion.com/angular/documentation/api/document-editor/#exportasimage) API. Here, all pages will be converted to image and inserted as pdf pages(works like print as PDF).
18
18
19
19
>Note:
20
+
* The Document Editor exports PDFs by converting pages into images on the client side, which may slightly increase file size compared to text-based PDFs.
21
+
* Text search is not supported in the exported PDF, as the content is stored as images.
20
22
* You can install the pdf export packages from this [`link`](https://www.npmjs.com/package/@syncfusion/ej2-pdf-export).
21
-
* There is one limitation we can’t search the text because we are exporting the pdf as image.
22
23
23
24
The following example code illustrates how to export the document as pdf in client-side.
Copy file name to clipboardExpand all lines: Document-Processing/Word/Word-Processor/asp-net-core/how-to/export-document-as-pdf.md
+5-2Lines changed: 5 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,9 +14,12 @@ This article explains how to export the document as PDF format. You can export t
14
14
15
15
## Export the document as PDF in client-side
16
16
17
-
Use [`pdf export component`](https://www.npmjs.com/package/@syncfusion/ej2-pdf-export) in application level to export the document as PDF using `exportAsImage` API. Here, all pages will be converted to image and inserted as PDF pages (works like print as PDF). There is one limitation, the text can't be searched because the PDF is exported as image.
17
+
Use [`pdf export component`](https://www.npmjs.com/package/@syncfusion/ej2-pdf-export) in application level to export the document as PDF using `exportAsImage` API. Here, all pages will be converted to image and inserted as PDF pages (works like print as PDF).
18
18
19
-
N> You can install the PDF export packages from this [`link`](https://www.npmjs.com/package/@syncfusion/ej2-pdf-export).
19
+
>Note:
20
+
* The Document Editor exports PDFs by converting pages into images on the client side, which may slightly increase file size compared to text-based PDFs.
21
+
* Text search is not supported in the exported PDF, as the content is stored as images.
22
+
* You can install the PDF export packages from this [`link`](https://www.npmjs.com/package/@syncfusion/ej2-pdf-export).
0 commit comments