why Evo PDF generates large size PDFs (HTML to PDF converter)? - html-to-pdf

I am using EVO pdf dll to convert aspx page having 3 chart control (with png format) in it to PDF, but it generates PDF having size of 400 kb.
IF RDLC is used to generate similar page then it generates page having size of 50 kb.But I dont have option of using RDLC.
Note that I tried JPEG compression setting also png chart images are of low dimensions (small size graphs) also the quality of images is not that great.
I coordinated with the evo pdf technical team but did not received proper response.
Your kind help highly appreciated.

You can also try to disable the font embedding with HtmlToPdfConverter.PdfDocumentOptions.EmbedFonts = false. This option can make the PDF document to not display the text properly if the font used in PDF is not installed on the computer where you display the PDF.
Another option to reduce the PDF document size is to set tmlToPdfConverter.PdfDocumentOptions.ImagesScalingEnabled = true. This can reduce the size and also the quality of large images displayed in HTML at a size much smaller than the actual physical size of the images.

Related

Is there anyway to increase the load time of a web page due to image quality?

Are there any web tricks to speed up the loading of a web page. I have a few pages where I have images which were created in photoshop, but they are saved as a PNG. The load time is fairly slow of the page due to this, is there anyway to speed up a page load? They are in the region of 1.2/1.5MB
Reducing the size of the file would be a significant advantage.
Additionally converting the asset to webp for Chrome and Firefox, jp2 for Safari and falling back to png would help retain quality while reducing file size.
If the image isn’t in the first viewport you can also try lazy loading the image with something like lazysizes or at the very least the loading attribute.
You could compress the images using an online tool. Although, this may slightly reduce the quality.
I’ve used this site before: https://tinypng.com/
Other than that, I’m not sure if you can “speed up” the load time for a webpage.
You can check your website images here
https://www.imghaste.com/pagespeed/
1.2 to 1.5MB for each image is way large.
You need to adopt a process where you can optimize/shrink images for your website.
If you don't really need the images to be PNG you can always convert them to JPEG.
https://www.imghaste.com/converter

Crystal reports file size

I am using crystal reports 2008,
I have an issue when adding an image into the file the file size increase over 7mb.
The original report is only around 30kb and the image is just under 300kb
Why is the report increasing to such a large file and how can I reduce this?
Crystal doesn't always play well some image formats. I'd recommend converting the image to a 256-bit .bmp and trying it again. This will also fix any image artifacts that you'd otherwise get while printing or exporting the report.
I know it's quite an old topic, but maybe still alive for other users.
You should open your Crystal, go into File -> Report Options and unselect the "Retain Original Image Color Depth" (or something similar in other CR versions).
This will reduce the final quality of the images, but drastically reduce the size of the PDF as well.
In my case, 2 dynamically added pics of ~500Kb were making an output PDF of 22MB (!!). After unflagging that, it was just a 1.2MB. Yes, the quality of the picture is worse, but in my case it was good enough.
Another trick is to avoid resizing the image inside Crystal Designer.
Instead, resize the image outside Crystal.

web loadable 80x80 thumbnail images - best format choice if compression is done on the server

I've read many of the png vs. jpg threads here and elsewhere. I didn't find this aspect covered for small images that are downloaded from a server.
A short recap:
Xcode optimizes png images that are delivered with the app bundle in a way that they are optimized for the iOS hardware ("png magic")
png images support transparency (which I don't need)
png is the better choice from graphics, jpg for pictures (we have pictures)
I'm building an app that periodically downloads feeds that contain links to thumbnail images (size 80x80). These images are presented side by side the text content in a tableview. I can influence which format is used (jpg, png) on the server side.
If I use an uncompressed png format, it will have about 17k size for one image. This is quite large. And since this png doesn't use the "png magic" of Xcode, the iPhone still might need quite some cpu to get them into the table view compared to an "Xcode prepared" png.
The same image as a compressed jpg is only 3k which is great.
Question: are there lab comparisons that show the real world performance of these 2 formats?
Another one: has anyone used jpgs of a similar size (80x80, 3k) successfully in a table-view?
Many thanks in advance
What do you mean "lab comparisons"? PNG is going to do better with flat colors -- it uses variations on run-length and dictionary encoding as I understand. JPEG will be better with images containing subtle gradients, and loses data mostly in jumps in luminosity which are hard for the human eye to see. "Better" here refers only to file size. It sounds like you would want JPEGs here.

how to watermark a rendered PDF (on context) without repeating the image

I'm rendering a PDF file on my iPad using a graphics PDF context. The PDFs vary in size but may be up to 90 pages. I need a background image on each page but if I simply draw it the PDF file size will be way larger. Is there a way to kinda only add it once and 'share' it somehow across pages?
Thanks
The PDF format specification enables you to re-use objects "by reference". You can re-use any object multiple times that is defined only once. Usually that happens with fonts, logos, background images, watermarks, ICC profiles, ....
I did a test where I repeated a background image behind each PDF page. Surprisingly, the file size increased by a single and constant amount, regardless of the number of pages with repeated backgrounds.
The verdict: The drawing to PDF context libraries are smarter than you might think.

Reduce the size of PDF file generated with Quartz2D

I'm looking for a way to reduce PDF size that I generate with Quartz. I'm drawing images with CGContextDrawImage in a CGPDFContext. What I'm afraid of is that the images are saved as Bitmap and not JPEG. Is there a way to check for that and a way to control that when writing the PDF?
I also tried reducing downscaling the image before writing it to the PDF context but I end up with an even larger file (although the page size in pixels is smaller).
Thanks!
There is no public API for setting CGPDFContext's image compression settings.
I'm not sur if you need to reduce PDF on the iPhone or if it's acceptable for you to reduce them on a PC/Mac.
On PC/Mac, Adobe Acrobat Pro (a commercial product not to be mistaken with Adobe Reader) has a PDF optimizer. Menu "Adavanced" > "PDF Optimizer...". This can downscale images, fonts, etc. As there is also a command-line interface (using AutoBatch). It isn't cheap but it's probably the best PDF compressor out there.