Skip to content

Commit

Permalink
VIEWERNET-4895 - Added comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
denis-gvardionov committed Jun 26, 2024
1 parent 8f684fc commit ab56aa1
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,14 @@ Module Program
End Module
```
{{< /tab >}}
{{< /tabs >}}
{{< /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 |

0 comments on commit ab56aa1

Please sign in to comment.