From: Ruth, Brice (bruth@Fiskars.com)
Date: Wed Jun 02 2004 - 07:15:30 PDT
OK, sounds good!! I'll give this a whack, and see if I can figure out a
decent way of getting the variable data in the PDF - if I have problems,
I'm sure you'll hear from me!! :)
Thanks again!
Alexander Peshkov wrote:
>Hello Brice,
>
>your message bounced from xep-support list because of attachment. Big
>attachments are not allowed in our public list. When you need to send us
>some files it is recommended to use support@renderx.com
>
>You hit a well known problem here :-) An fo:external-graphic is an
>inline-level element. When it is hosted in a block, there is always a
>bit of white space before and after each inline element known as
>half-leading. It's this space that leads to increased height of the
>block-container content and thus to the overflow. It's enough to
>specify line-height="0pt" on the block that encloses the image in
>order to achieve correct behavior.
>
>However in your case the better technique would be to place
>printer-marks.pdf into the region-body background rather then employ
>absolutely-positioned container. The following code demonstrates this
>approach:
>
><?xml version="1.0"?>
><fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
> <fo:layout-master-set>
> <fo:simple-page-master master-name="main"
> page-width="4.42in" page-height="2.92in">
> <fo:region-body background-image="url('printer-marks.pdf')"
> padding-top="((2.92in - 2in) div 2) + 0.165in"
> padding-left="((4.42in - 3.5in) div 2) + 0.18in"/>
> </fo:simple-page-master>
> </fo:layout-master-set>
> <fo:page-sequence master-reference="main">
> <fo:flow flow-name="xsl-region-body">
> <fo:block>
> <fo:external-graphic src="url('content.pdf')"/>
> </fo:block>
> </fo:flow>
> </fo:page-sequence>
></fo:root>
>
>(note that I reproduced spacing that appeared in your original code
>using region-body padding)
>
>Regarding your question about the best way to "marry" varying data
>with static image: the answer depend on the nature of the data.
>Since you haven't send us content.pdf I have no idea what kind of
>content you are trying to add to your boiler-plate PDF so it's hard to
>make any reasoned suggestions. In general you will place boiler-plate
>image in the background and then cover it with content which can be
>positioned in a number of ways (using margins/paddings, absolute
>containers, tables, etc.).
>
>Best regards,
>Alexander Peshkov mailto:peshkov@renderx.com
>RenderX
>
>P.S.: I'm not the only one responsible for support of XEP but all of
> us have other tasks also.
>
>RB> ----- Original Message -----
>RB> From: "Ruth, Brice" <bruth@Fiskars.com>
>RB> To: <xep-support@renderx.com>
>RB> Sent: Tuesday, June 01, 2004 10:42 PM
>RB> Subject: external-graphic doesn't fit?!
>
>
>RB> I have a simple-page-master setup with a width of 4.42in and height of
>RB> 2.92in. I have placed a block-container, absolutely positioned, which
>RB> contains an external-graphic (within a block), whose width & height is
>RB> exactly 4.42in x 2.92in. Unfortunately, I have to scale the height of
>RB> the graphic to 2.84in for XEP not to 'overflow' ...
>
>RB> What's going on here?!
>
>RB> <?xml version="1.0"?>
>RB> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
>RB> <fo:layout-master-set>
>RB> <fo:simple-page-master master-name="main"
>RB> page-width="4.42in" page-height="2.92in"
>RB> margin-top="((2.92in - 2in) div 2) + 0.165in"
>RB> margin-left="((4.42in - 3.5in) div 2) + 0.18in">
>RB> <fo:region-body/>
>RB> </fo:simple-page-master>
>RB> </fo:layout-master-set>
>RB> <fo:page-sequence master-reference="main">
>RB> <fo:flow flow-name="xsl-region-body">
>RB> <fo:block>
>RB> <fo:external-graphic src="url('content.pdf')"/>
>RB> </fo:block>
>RB> <fo:block-container
>RB> absolute-position="fixed">
>RB> <fo:block>
>RB> <fo:external-graphic
>RB> src="url('printer-marks.pdf')"
>RB> width="4.42in" height="2.84in"/>
>RB> </fo:block>
>RB> </fo:block-container>
>RB> </fo:flow>
>RB> </fo:page-sequence>
>RB> </fo:root>
>
>RB> Setting the height on the 'printer-marks.pdf' to 2.92in, provides the
>RB> following error on output:
>
>RB> [warning] content overflow in an absolutely positioned block-container
>
>RB> I've attached the 'printer-marks.pdf' if it helps.
>
>RB> Many thanks!
>
>RB> Brice Ruth
>
>
>-------------------
>(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
>in the body of the message to majordomo@renderx.com from the address
>you are subscribed from.
>(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html
>
>
-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo@renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html
This archive was generated by hypermail 2.1.5 : Wed Jun 02 2004 - 07:36:37 PDT