Improving PDF background image

I have a report which needs to use a pretty background image [originally provided in a Word document, converted to an image].

I am however noticing some issues with regard to scaling, in that an image needs to be a certain size (413 px x 595 px) in my case, otherwise it is oversized.

This also means that the quality is shocking.
My client wants a crisp background image for their report, which I cannot currently achieve.

How have others worked around this issue?

Thanks.

Re: Improving PDF background image

What format are you using? PNG/JPG/TIFF?

ex: TIFF will give you one of the best images, but a large file compared to the others.

Try saving to all the formats and see of this helps. Or trying using another app to take a screenshot instead of using save as…

Regards,
Scott.

Re: Improving PDF background image

Is 413 px x 595 px a scriptcase limitation?

I personally prefer generating PDF’s from Scriptcase applications using the FPDF and HTML2PDF classes instead of a scriptcase PDF report, gives me loads more flexibility. This way I can include images of any size and quality. Furhtermore my data is not “stuck” to one background image.

Re: Improving PDF background image

@ScottMartin:
I used a PNG. If I look at the example:
http://www.scriptcase.net/siteen/samples/tutoriais/pdf/pdf03.php
The background image looks OK in the tutorial, but not so great once it’s applied to the final PDF - the raster effect degrades the whole image.
Thus it’d be great to start with a larger hi-res image and scale it down, but this doesn’t appear possible.

@Freezer:
It’s the best compromise for the image I had at hand.
Is there an example somewhere which shows me how to incorporate FPDF into my report - especially if I could scale down a hi-res image.

The alternative would be to use several image elements which are high-res and scaled down and placed in the appropriate locations.

Re: Improving PDF background image

Integrating fpdf in a pdf report is not possible, at least it will not solve your problem. Is creating a custom pdf report using fpdf an option versus standard scriptcase pdf report?

Re: Improving PDF background image

My solution was to change certain text elements to static text, pity about the limited available fonts.

For images that needed to look good, I started with a high resolution image and used the following code to place and scale it in the “code” section:

sc_pdf_image ('../_lib/img/header.jpg', 4, 5, 190, 20,'jpg')

;

Now, if only I could figure out out to dynamically generate a table grid…

Re: Improving PDF background image

I have excellent results of PDF background image by creating a .png in the following manner:

  1. Using Adobe Illustrator, document setup uses “mm” for unit display (this probably doesn’t matter), document size is 216mm x 279mm (the size of 8.5" x 11")

  2. “Save for Web & Devices”, choose PNG-8 for type, colors = 16 (or 32 for more color image), No Dither, Image Size = 200% (432mm x 558mm)

3a. set new .png as background (it will automatically size it to 216mm x 279mm) …
3b. OR use sc_pdf_image(’…/_lib/img/YourDoubleSizedImage.png’,0,0,216,279,‘png’)

Re: Improving PDF background image

Thanks JackOfAllTrades,

Good contribution