[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

pdf writer, are loose objects always "on top"

uncle

1/1/2008 5:49:00 AM

I have a watermark image that I want beneath the content of every
page. I'd like to use loose objects so I do bloat the file, but loose
objects seem to always be on top, making for a very poor BACKGROUND
watermark !
1 Answer

uncle

1/1/2008 4:17:00 PM

0

On Dec 31 2007, 11:49 pm, "akt...@gmail.com" <akt...@gmail.com> wrote:
> I have a watermark image that I want beneath the content of every
> page. I'd like to use loose objects so I do bloat the file, but loose
> objects seem to always be on top, making for a very poor BACKGROUND
> watermark !

Ok, this seems to work...

#===== shazam
# move the last content item for this page (the loose object)
# to the front pf the content array
#===== shazam
c = pdf.current_page.contents
pdf.current_page.contents =
c.slice(-1,1).concat(c.slice(0,c.length-1))