Image loading

Image loading

Forum member · Oct 7, 2008
Hi, I've to populate a technical sheet with about 200 pages made by images (PNG) and summary tables. The processes takes several minutes to be completed, a bottleneck found was the image loading, that I manage with this code line : schemaImg = new pdf.PageElements.Image(fileName, 0, 10, zf); this line takes from 2 up to 3 secs to be executed. Is there any faster way to load an image, for example i see specialized class for image such as PngImageData could be used in some way to optimize the process? Thanks.

Re: Image loading

Support · Oct 7, 2008
Hello, The time taken to load an image depends on the size of the image also. If you are adding a big image then it may take some time. You can refer to Images topic on our help document to see the different ways of adding images to the PDF. If you are reusing the same image in the document or in other documents then you can use the ImageData object. This will load the image into memory and you can use this data in the document later. You can refer to the Image Reuse on our help documentation. You may try using the image data class. PngImageData is inherited from ImageData class. Thanks, ceTe Software Support Team.