Auto Truncation in FOP block-container

Hi Experts,

 Is there a way in FOP's block-container to truncate the contents if can't be fit within the block-container. I tried overflow="hidden" with the absolute positioning but could not get any success.

Any suggestion around this will be helpful.

Thanks!
Sanjeev
LVL 1
sanjeev_mcaAsked:
Who is Participating?
 
Geert BormansConnect With a Mentor Information ArchitectCommented:
absolute positioning and overflow="hidden" is what you should do
You also need to set the size, of course
Are you sure you don't switch off the overflow in a deeper block?
Please show us the block container
This works
         <fo:block-container position="absolute" overflow="hidden" top="3pt" left="150pt" height="30pt" width="50pt" border-width="1.0pt" border-color="red">
            <fo:block>
               <fo:inline>
                 aaa bbb ccc ddd eee fff ggg hhh iiii jjjj kkkk llll mmmm nnnn oooo pppp qqqq rrrr ssss tttt
               </fo:inline>
             </fo:block>
         </fo:block-container>

Open in new window

0
 
sanjeev_mcaAuthor Commented:
Hi Gertone,

 Thanks for the reply. Please find below the block container i am using.
<fo:block-container absolute-position="absolute" overflow="hidden" left="2.0in" top="1.0in" height="1.0in" width="3.0in" border-width="1.0pt" border-color="red" background-color="yellow">
	
	<fo:block font-size="9" wrap-option="wrap" margin-bottom=".1in" space-after.optimum="3pt">This is an example block. this should result in an overflow and the contents should get truncated</fo:block>
	<fo:block font-size="9" wrap-option="wrap" margin-bottom=".1in" space-after.optimum="3pt">Here starts the block:</fo:block>
	
		<fo:list-block provisional-distance-between-starts="15mm" provisional-label-separation="5mm"><fo:list-item><fo:list-item-label><fo:block font-family="Symbol" font-size="6pt">•</fo:block></fo:list-item-label><fo:list-item-body start-indent="5mm" text-align="left"><fo:block font-size="9" wrap-option="wrap">First bullet Point</fo:block></fo:list-item-body></fo:list-item></fo:list-block>
		<fo:list-block provisional-distance-between-starts="15mm" provisional-label-separation="5mm"><fo:list-item><fo:list-item-label><fo:block font-family="Symbol" font-size="6pt">•</fo:block></fo:list-item-label><fo:list-item-body start-indent="5mm" text-align="left"><fo:block font-size="9" wrap-option="wrap">Second Bullet Point</fo:block></fo:list-item-body></fo:list-item></fo:list-block>
		<fo:list-block provisional-distance-between-starts="15mm" provisional-label-separation="5mm"><fo:list-item><fo:list-item-label><fo:block font-family="Symbol" font-size="6pt">•</fo:block></fo:list-item-label><fo:list-item-body start-indent="5mm" text-align="left"><fo:block font-size="9" wrap-option="wrap">This bullet should not have printed if overflow works</fo:block></fo:list-item-body></fo:list-item></fo:list-block>
	
</fo:block-container>

Open in new window

0
 
Geert BormansInformation ArchitectCommented:
Well, I tested with an old Antenna House and FOP 0.95,
both do the truncation correctly,
maybe you still use the FOP 0.20, it is a release that is used in many products internally,
I will check that I can hold of a FOP 0.20 install to check.
I do recommend that you move to the latest stable FOP
0
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

 
Geert BormansInformation ArchitectCommented:
Nope, also FOP0.20 does the correct thing (but screws up the absolute positioning) XEP from RenderX seems not to be fully compliant. I think you need to look for other errors in your FO.
What is your FO processor version number?
0
 
sanjeev_mcaAuthor Commented:
Gertone,

 I am using fop version 0.95.

from manifest.mf of fop.jar

Implementation-Title: Apache FOP
Implementation-Version: 0.95
0
 
Geert BormansInformation ArchitectCommented:
That is weird. Could you send the full FO and an indication of where it goes wrong? Then I will check out where the bug is
0
 
sanjeev_mcaAuthor Commented:
Gertone,

I just tried by changing the Output Format to PDF and its working fine. But my target output is to generate a PCL out of this XSL FO. I think FOP does not support this feature for PCL.

Any thoughts over this ?
0
 
Geert BormansInformation ArchitectCommented:
Ah, that could be the explanation.
I seemed to have read somewhere that the 1.0 will implement full clipping for all output formats.
I think you should ask a FOP specific list for that.
I only have experience with the PDF output of various processors
0
 
Geert BormansInformation ArchitectCommented:
original question
> Is there a way in FOP's block-container to truncate the contents if can't be fit within the block-container.
was answered

PCL only came up in comment number 8.
please reward the suggestions prior to that.
99% of FOP use is for PDF, you could have specified PCL in your question
0
 
Geert BormansInformation ArchitectCommented:
original question
> Is there a way in FOP's block-container to truncate the contents if can't be fit within the block-container.
was answered

PCL only came up in comment number 8.
please reward the suggestions prior to that.
99% of FOP use is for PDF, you could have specified PCL in your question
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.