Printing Report with Image is SLOW.... without Image is FAST --?

Hi,
Using Clarion11 and Net Talk and printing a Report of 1 line item. Using Net Talk extension to print to SV PDF. I have a picture (color) 3.4MB from a camera.
If I print the report WITHOUT the picture it prints immediately.
If I print the report WITH the picture, it takes about 4 seconds - really slow.
The picture is color but most of the folks printing this report will have B/W printers.
So - any tips to speed up printing report to PDF with the image?
TIA,
Ron Jolda

Hi Ron,

You could process the image down with ImageEx.

Even just loading it into a ImageExBitmapClass object, setting the compression level to 70-80% and then saving it with a ImageExJpegSaverClass would probably knock the file size down to a few hundred K and most likely you could not tell the difference in the output.

There are other options to even take it to B&W but you probably won’t need to go that far.

Have you tried it with a smaller image?

Does your image need to be 3.4MB? Can you resize it, or change it to a .jpg?

Hi Ron,
Your laser printer is probably printing the image at 300 dpi. I use irfanview to reduce the resolution to about 20KB. You can reduce all the images in a folder in batch mode to say 10%. You can hardly tell the difference when they are printed. Or you can do it on the fly in the report procedure.

HI Bob,

Printing it to PDF. PDF creation with a 4 MB JPG file is about 4 seconds. I have shrunk the JPG to about 200K using ImageEx by compressing it. However. It still takes about 4 seconds. So, I most likely will benefit from reducing the resolution and to what level – 100 dpi?

Thanks,

Ron

you might need to do some additional processing. I “think” images expand to bitmaps and then get altered for the final format and print.

So if you alter your image: canvas size and resolution to what you actually want to print it will be way quicker. i.e. make it 6x4 cm at 72dpi or whatever. That way there is little processing needs take place. The alternative is a huge image that gets totally expanded then resized to fit the dpi and physical size

ImageEx I understand will do everything you need.

Sean,

Many thanks. I think that this info will be just what I need. I will work it in ImageEx.

Thanks,

Ron

Hi Ron,

I reduce my jpg images to about 20K. I have a report that shows a customer invoice with a small (2" by 3") picture of each line item. It prints the images that look like they are high resolution. And I can email the invoices as a pdf attachment without any oversize issues.

I don’t use ImageEx, but if ImageEx has a 100 dpi setting, then I would use the 300 dpi setting, which the printer would use and not need to convert 100 dpi to 300 dpi.

That’s my guess.

Bob

HI Bob and Sean,

Compressing my jpg from 4 MB to 200 KB using jpg compression did not help.

However, the original picture size was 4080 x 3072 px. Resizing to 480 x 300 px did the trick! Now fits the size and prints right off the way it is supposed to.

So, I import the original JPG (4MB) into ImageEx, and then resize it to 10% of original. Then I compress it using 80% compression and I get my 4080 x 300 px file which is all I need. That took file size to 3K!

Critical point was RESIZING the image!

Thanks guys for your help.

Ron

GDI Printing is slow with large images compared to the newer better performance XPS.

GDI converts graphics to EMF (Enhanced Metafile) format, which can introduce overhead and quality loss.

XPS uses a spool file format that’s more compact and efficient for modern printers. Its also optimised for high quality image output.

Direct2D/DirectWrite is another alternative, which uses GPU acceleration but will require even more coding.

An IPP Class Driver is a universal printer driver built into Windows that allows printing over a network using the Internet Printing Protocol (IPP) for sending print jobs over http/s to network printers, without needing vendor-specific drivers. Universal, but could also be slower.

Hi Everyone,
THanks for your help. WIth the insight of a few folks on discord I solved the problem. I used ImageEx to shrink my 4MB JPG to 200KB. However this did not resolve my printing problem. I found that the original picture size was 4080 x 3072 px. And the shrunk image was the same size. So, I re-sized the image to 408x307. That was the piece that solved the print problem. Now, prints lightning fast! The image on paper is only about 3 inches x 3 inches.
Thanks for your help,
ROn

Thanks Ron for the giving us your results. Good to know. I’m always a little surprised but it makes sense.

Bob

Hi Bob,

I have been using Clarion since 1986. I never really had to deal with printing images….until now. With webcams and cell phones, things have changed. My android phone pic is natively 4.3 MB jpg. However, with resizing and compressing it, my image is only 22K and is very good. So, if my customers are sending up 4 pics from their mobile device, that is a bunch of storage space for each user….

Always stuff to learn. It is good to have the clarion users group to help with defining and understanding the problems so that they can get resolved!

Ron