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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Gertone (Geert Bormans)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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
Gertone (Geert Bormans)Information 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
Become a CompTIA Certified Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

Gertone (Geert Bormans)Information 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
Gertone (Geert Bormans)Information 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
Gertone (Geert Bormans)Information 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
Gertone (Geert Bormans)Information 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
Gertone (Geert Bormans)Information 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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Languages and Standards

From novice to tech pro — start learning today.