-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added descriptions for PDF optimization options and Detect encoding
- Loading branch information
1 parent
c9fb682
commit 8873e70
Showing
19 changed files
with
415 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
net/developer-guide/loading-documents/detect-encoding-when-loading-documents.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
id: detect-encoding-when-loading-documents | ||
url: viewer/net/detect-encoding-when-loading-documents | ||
title: Detect encoding when loading documents | ||
weight: 5 | ||
description: "This article explains how to detect encoding when loading documents with GroupDocs.Viewer within your .NET applications." | ||
keywords: get encoding, detect encoding | ||
productName: GroupDocs.Viewer for .NET | ||
hideChildren: False | ||
--- | ||
You can detect the file encoding using [LoadOptions](https://reference.groupdocs.com/viewer/net/groupdocs.viewer.options/loadoptions). If the encoding cannot be detected the default, GroupDocs.Viewer uses the default [encoding]({{< ref "viewer/net/developer-guide/loading-documents/specify-encoding-when-loading-documents.md" >}}). | ||
|
||
This feature is supported for the following documents: | ||
|
||
* [Plain-text (.txt) files](https://docs.fileformat.com/word-processing/txt/) | ||
* [Comma-separated values (.csv)](https://docs.fileformat.com/spreadsheet/csv/) | ||
* [Tab-separated values (.tsv)](https://docs.fileformat.com/spreadsheet/tsv/) | ||
|
||
The following code snippet shows how to detect the document encoding: | ||
|
||
{{< tabs "example1">}} | ||
{{< tab "C#" >}} | ||
```csharp | ||
LoadOptions loadOptions = new LoadOptions(); | ||
loadOptions.DetectEncoding = true; // Enable encoding detection | ||
using (Viewer viewer = new Viewer("employees.csv", loadOptions)) | ||
{ | ||
HtmlViewOptions viewOptions = HtmlViewOptions.ForEmbeddedResources(); | ||
|
||
viewer.View(viewOptions); | ||
} | ||
``` | ||
{{< /tab >}} | ||
{{< /tabs >}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
46 changes: 0 additions & 46 deletions
46
net/developer-guide/processing-attachments/how-to-convert-and-view-attachments.md
This file was deleted.
Oops, something went wrong.
37 changes: 0 additions & 37 deletions
37
net/developer-guide/processing-attachments/how-to-extract-and-save-attachments.md
This file was deleted.
Oops, something went wrong.
40 changes: 0 additions & 40 deletions
40
net/developer-guide/processing-attachments/how-to-list-attachments.md
This file was deleted.
Oops, something went wrong.
41 changes: 41 additions & 0 deletions
41
...ng-to-pdf/optimization-pdf-options/optimize-content/allow-reuse-page-content.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
id: allow-reuse-page-content | ||
url: viewer/net/allow-reuse-page-content | ||
title: Reuse page content | ||
linkTitle: Reuse page content | ||
weight: 9 | ||
description: "This topic describes how to reuse page content in a PDF file using the GroupDocs.Viewer .NET API (C#)." | ||
keywords: convert to pdf, optimize size, pdf reduce size | ||
productName: GroupDocs.Viewer for .NET | ||
hideChildren: False | ||
toc: True | ||
--- | ||
This property allows you to reuse the content for identical pages when optimizing the document. | ||
|
||
To allow reusing page content in a PDF file, set the [AllowReusePageContent](https://reference.groupdocs.com/viewer/net/groupdocs.viewer.options/pdfoptimizationoptions/linkduplicatestreams/) property to `true`. | ||
|
||
The following code snippet shows how to link duplicate streams in a PDF file: | ||
|
||
{{< tabs "Example1">}} | ||
{{< tab "C#" >}} | ||
```csharp | ||
using GroupDocs.Viewer; | ||
using GroupDocs.Viewer.Options; | ||
using GroupDocs.Viewer.Domain.Documents.PostProcessing.Pdf.Optimization; | ||
// ... | ||
using (var viewer = new Viewer("sample.docx")) | ||
{ | ||
PdfViewOptions viewOptions = new PdfViewOptions(); | ||
viewOptions.PdfOptimizationOptions = new PdfOptimizationOptions | ||
{ | ||
AllowReusePageContent = true | ||
}; | ||
|
||
viewer.View(viewOptions); | ||
} | ||
``` | ||
{{</ tab >}} | ||
{{</ tabs >}} | ||
|
||
|
41 changes: 41 additions & 0 deletions
41
...ring-to-pdf/optimization-pdf-options/optimize-content/link-duplicate-streams.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
id: link-duplicate-streams | ||
url: viewer/net/link-duplicate-streams | ||
title: Link duplicate streams | ||
linkTitle: Link duplicate streams | ||
weight: 6 | ||
description: "This topic describes how to link duplicate streams in a PDF file using the GroupDocs.Viewer .NET API (C#)." | ||
keywords: convert to pdf, optimize size, pdf reduce size | ||
productName: GroupDocs.Viewer for .NET | ||
hideChildren: False | ||
toc: True | ||
--- | ||
Sometimes a document contains several identical resource streams, like images. GroupDocs.Viewers can compare all resource streams. If streams are duplicated, it merges them leaving only one copy, changes the references appropriately, and removes copies of the object. This can significantly decrease the document size. | ||
|
||
To link duplicate streams in a PDF file, set the [LinkDuplicateStreams](https://reference.groupdocs.com/viewer/net/groupdocs.viewer.options/pdfoptimizationoptions/linkduplicatestreams/) property to `true`. | ||
|
||
The following code snippet shows how to link duplicate streams in a PDF file: | ||
|
||
{{< tabs "Example1">}} | ||
{{< tab "C#" >}} | ||
```csharp | ||
using GroupDocs.Viewer; | ||
using GroupDocs.Viewer.Options; | ||
using GroupDocs.Viewer.Domain.Documents.PostProcessing.Pdf.Optimization; | ||
// ... | ||
using (var viewer = new Viewer("sample.docx")) | ||
{ | ||
PdfViewOptions viewOptions = new PdfViewOptions(); | ||
viewOptions.PdfOptimizationOptions = new PdfOptimizationOptions | ||
{ | ||
LinkDuplicateStreams = true | ||
}; | ||
|
||
viewer.View(viewOptions); | ||
} | ||
``` | ||
{{</ tab >}} | ||
{{</ tabs >}} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
...ndering-to-pdf/optimization-pdf-options/optimize-content/remove-private-info.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
id: remove-private-info | ||
url: viewer/net/remove-private-info | ||
title: Remove private information | ||
linkTitle: Remove private information | ||
weight: 5 | ||
description: "This topic describes how to remove private information from a PDF file using the GroupDocs.Viewer .NET API (C#)." | ||
keywords: convert to pdf, optimize size, pdf reduce size | ||
productName: GroupDocs.Viewer for .NET | ||
hideChildren: False | ||
toc: True | ||
--- | ||
A PDF file often contains private information. GroupDocs.Viewer allows you to remove this information to protect sensitive data, enable secure document exchange and minimize the risks of data leakage. | ||
|
||
To remove fonts in a PDF file, set the [RemovePrivateInfo](https://reference.groupdocs.com/viewer/net/groupdocs.viewer.options/pdfoptimizationoptions/removeprivateinfo/) property to `true`. | ||
|
||
The following code snippet shows how to remove private information from a PDF file: | ||
|
||
{{< tabs "Example1">}} | ||
{{< tab "C#" >}} | ||
```csharp | ||
using GroupDocs.Viewer; | ||
using GroupDocs.Viewer.Options; | ||
using GroupDocs.Viewer.Domain.Documents.PostProcessing.Pdf.Optimization; | ||
// ... | ||
using (var viewer = new Viewer("sample.docx")) | ||
{ | ||
PdfViewOptions viewOptions = new PdfViewOptions(); | ||
viewOptions.PdfOptimizationOptions = new PdfOptimizationOptions() | ||
{ | ||
RemovePrivateInfo = true | ||
}; | ||
|
||
viewer.View(viewOptions); | ||
} | ||
``` | ||
{{</ tab >}} | ||
{{</ tabs >}} | ||
|
||
|
Oops, something went wrong.