>
> Use the KeepImage flag *always*, the implementation of VPE's cache
> is very smart.
There is absolutely no reason nor a scenario
> where we would NOT recommend to use it.
>
Thanks for the tips. Worked very well with the WMF. It's only a few
bytes small and prints very well as it is vector graphics.
It now looks like diagonal "lines" of "For Evaluation only".
This is what we have done in order someone else wants an effect like
that.
1. create an image with some simple text; probably light gray and
save to WMF.
2. call code upon page-Setup, before actually populating the page.
Something like this:
*--------------------------------------*
this.oVPE.RenderPicture(VFREE, VFREE, lcImgFile, PIC_KEEPIMAGE)
lnPictureWidth = this.oVPE.nRenderWidth
lnPictureHeight= this.oVPE.nRenderHeight
*-- now, we do not want to print over the borders of the page
*-- so check how many of the Images we can pack on the page
*-- and center them.
lnRows = int( this.oVPE.PageWidth / lnPictureWidth)
lnColumns = int( this.oVPE.PageHeight / lnPictureHeight)
lnLeft = (this.oVPE.PageWidth - lnPictureWidth*lnColumns) / 2
lnTop = (this.oVPE.PageHeight - lnPictureHeight * lnRows) / 2
this.oVPE.nRight = lnLeft
this.oVPE.nTop = lnTop
for lnRow = 1 to lnRows
this.oVPE.nRight = lnLeft
if lnRow > 1
this.oVPE.nTop = this.oVPE.nBottom
endif
for lnCol = 1 to lnColumns
this.oVPE.Picture(;
VRIGHT, VTOP, -lnPictureWidth, -lnPictureRight,;
lcImgFile, PIC_KEEPIMAGE)
endfor && lnCol...
endfor && lnRow = 1 ...
*------------------------------------*
This is VFP, but should easily translate into other languages (it's
not rocket science anyway
)