AUTHOR: Rumen Zhekov
DATE POSTED: August 28, 2018
The solution is to compress the pdf data using the free Pako.js library by importing it on the page:
<!-- Load Pako ZLIB library to enable PDF compression -->
<
script
src
=
"https://demos.telerik.com/aspnet-ajax/Common/Scripts/pako.min.js"
></
>
You can get the JavaScript file from: http://demos.telerik.com/aspnet-ajax/Common/Scripts/pako.min.js or via its GitHub repo. The compression can be especially of a great help in the output file size when you are using custom TTF fonts or images with alpha channel (i.e. PNGs with transparency). Another approach you can try is sending the file to the server: http://docs.telerik.com/devtools/aspnet-ajax/controls/clientexportmanager/how-to/save-exported-files#use-page-method. Instead of writing on the server, you can also output it to the response as shown in the attached example, which uses directly the underlying Kendo library and forces the proxy usage: http://docs.telerik.com/kendo-ui/framework/save-files/introduction#force-proxy-usage. With this, the base64 string from the client will go to the server and the server will return the file. You can see how to configure it in more detail at: https://demos.telerik.com/kendo-ui/pdf-export/index.
Resources Buy Try