Scaling of background-image

2003-02-19 Thread Jeff_Mitchell
I'm working on getting a block to use a background image, but it seems that
when the image is inserted into the PDF, it's put in at some terribly low
resolution.  I'm trying to get the image to scale to fit the space of the
block, but to no avail.  Here's a quick snippet of the FO I'm using:

fo:layout-master-set
  fo:simple-page-master master-name=page-1 page-width=612pt
page-height=792pt
   fo:region-body margin-top=54pt margin-bottom=54pt
margin-left=54pt margin-right=36pt /
  /fo:simple-page-master
 /fo:layout-master-set
 fo:page-sequence master-reference=page-1
  fo:flow flow-name=xsl-region-body
   fo:block background-image=url(MO399Ver1med.jpg) width
=522pt height=684pt
fo:table table-layout=fixed

The jpeg used in the background image is 1462x1982px, and I believe it's
being put in the PDF at either 72 or 96 dpi, which causes the PDF to just
show the upper left portion of the image.  I saw that the FO spec includes
the background-position-horizontal and background-position-vertical
properties, which look like they'd fit the bill, but aren't implemented
yet.

I can create a full-page external-graphic using the height and width
attributes, but anything else in my FO file flows on to the next page (of
course...)  I looked at creating a block-container, but it appears that FOP
doesn't have any of the absolute positioning properties implemented yet, so
I'm not sure how I can get a block on top of the full-page
external-graphic.

Does anyone have any ideas how to either specify the page size/scaling
vector of a block's background-image, or how to overlay a block on top of a
full-page external-graphic?  I'd be most grateful for any pointers.

-Jeff


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Scaling of background-image

2003-02-19 Thread Roland Neilands
Jeff,


 I'm working on getting a block to use a background image, but
 it seems that
 when the image is inserted into the PDF, it's put in at some
 terribly low
 resolution.  I'm trying to get the image to scale to fit the
 space of the
 block, but to no avail.

This worked.

fo:block-container width=522pt height=684pt top=0cm left=0cm
  position=absolute
  fo:block
fo:external-graphic src=url(MO399Ver1med.jpg) scaling=uniform/
  /fo:block
/fo:block-container
fo:table ...

top  left properties are relative to the region it is in. Put it in the
region-before flow(*) instead to get it right at the page top if you use
margins.

(*) or static-content to repeat on every page if it's a watermark.

Cheers,
Roland


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Scaling of background-image

2003-02-19 Thread Jeff_Mitchell

Roland-

And just as Jeff was preparing to leave work, a ray of light came down
from the sky, and a voice spoke to him.  'Jeff', the voice said, 'I am
Roland, the keeper of the knowledge of absolute positioning.  Check your
e-mail one last time before leaving.'  And Jeff checked his e-mail, and saw
that instructions had come in electronic format from on high.  And Jeff did
cut.  And Jeff did paste.  And Jeff did edit.  And Jeff did finally call
FOP and open the resulting PDF, and it was good.

Thanks a million.  That worked beautifully.  Now I won't have to kick the
dog (actually cat, as we don't have a dog) when I get home.

-Jeff




Roland Neilands   

[EMAIL PROTECTED]   To: [EMAIL PROTECTED]

ng.com.au cc:  

   Subject: RE: Scaling of 
background-image 
02/19/2003 04:39 PM 

Please respond to   

fop-user









Jeff,


 I'm working on getting a block to use a background image, but
 it seems that
 when the image is inserted into the PDF, it's put in at some
 terribly low
 resolution.  I'm trying to get the image to scale to fit the
 space of the
 block, but to no avail.

This worked.

fo:block-container width=522pt height=684pt top=0cm left=0cm
  position=absolute
  fo:block
fo:external-graphic src=url(MO399Ver1med.jpg) scaling=uniform/
  /fo:block
/fo:block-container
fo:table ...

top  left properties are relative to the region it is in. Put it in the
region-before flow(*) instead to get it right at the page top if you use
margins.

(*) or static-content to repeat on every page if it's a watermark.

Cheers,
Roland


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]