From ab56aa14c8fa499ef60b3400b1f2f64d774d0220 Mon Sep 17 00:00:00 2001 From: "denis.gvardionov" Date: Wed, 26 Jun 2024 14:44:17 +0300 Subject: [PATCH] VIEWERNET-4895 - Added comparison --- .../pdf-remove-unused-resources.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/net/developer-guide/rendering-documents/rendering-to-pdf/optimization-pdf-options/pdf-remove-unused-resources.md b/net/developer-guide/rendering-documents/rendering-to-pdf/optimization-pdf-options/pdf-remove-unused-resources.md index a271453..4f65778 100644 --- a/net/developer-guide/rendering-documents/rendering-to-pdf/optimization-pdf-options/pdf-remove-unused-resources.md +++ b/net/developer-guide/rendering-documents/rendering-to-pdf/optimization-pdf-options/pdf-remove-unused-resources.md @@ -71,4 +71,14 @@ Module Program End Module ``` {{< /tab >}} -{{< /tabs >}} \ No newline at end of file +{{< /tabs >}} + +As it is explained above, the effectiveness of the described optimizations depends solely on the specific PDF file — if it has no “orphaned” objects or streams, then these optimizations will do nothing, they only increase the document processing time. However, in some cases they can reduce the document size significantly, even several times. + +We checked both `RemoveUnusedObjects` and `RemoveUnusedStreams` on our internal sample PDF documents, and measured their size before and after applied optimizations. Results are shown in the table below. + +| Filename | Original size, bytes | `RemoveUnusedObjects`, bytes | `RemoveUnusedStreams`, bytes | +| ----------- | ------- | -------- | ------- | +| Sample1.pdf | 131 832 | 2 274 | 131 832 | +| Sample2.pdf | 131 870 | 131 774 | 2 690 | +