Control wrap of long lines in PDF H/Fs?

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.
Post Reply
Phlawm53
Sr. Propeller Head
Posts: 442
Joined: Tue Mar 16, 2010 10:58 am
Location: San Francisco, CA
Contact:

Control wrap of long lines in PDF H/Fs?

Post by Phlawm53 »

------
For Flare 11, although the problem evidently still exists in (a trial instance of) Flare 2017, PDF Target.

Has anybody figured out how to control, which is to say block, the wrapping of long text in Print / PDF Headers and Footers? My repeated attempts to control the wrapping seem to indicate that CSS which controls overflow text in online outputs does NOT work in PDFs(?)

The following composite image illustrates the problem.
HeadingWrapProblem.png
The smaller inset image illustrates the insertion of the Level1 Flare system variable into a header footer.

NOTE that the H/F frame contains:
■ A two-columns table style that vertically and horizontally aligns H/F content.
■ CSS P classes that style the text.

As shown, the problem is that IF the the Level1 system variable references a somewhat longer H1 in the topic, THEN Flare wraps the longer text to a second line. I want to prevent that wrapping.

BUT despite extensive experiments, it seems that Flare's PDF engine does NOT recognize CSS overflow or white-space: nowrap; attributes, et cetera. Along the way I've tried wrapping the text in a fixed-width DIV along with a "gazillion" other tricks. It appears that the H/F text is not subject to CSS controls that would prevent the wrapping(?)

Has anyone manged to solve this problem?

Cheers & thanks,
Riley
SFO
You do not have the required permissions to view the files attached to this post.
Nita Beck
Senior Propellus Maximus
Posts: 3667
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Control wrap of long lines in PDF H/Fs?

Post by Nita Beck »

Riley, it looks like the table in the header has two cells of equal width (that is, 50% and 50%). What happens if you make the first column have a width of, say, 25% and the second column have a width of 75%? I suspect the problem is that the container (that is, the right cell) is not large enough not to hold the content without wrapping the content.
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
Phlawm53
Sr. Propeller Head
Posts: 442
Joined: Tue Mar 16, 2010 10:58 am
Location: San Francisco, CA
Contact:

Re: Control wrap of long lines in PDF H/Fs?

Post by Phlawm53 »

Nita:

Thanks but my question wasn't meant to be about how I can redesign my document's headers and footers to deal with (this particular illustration of ) unwanted text wrapping. The question is and remains, is there a way to control, which is to say block, the wrapping behavior in Print / PDF output?

I can make it work in online outputs. So I'm fairly certain I've found my way to the correct CSS attributes.

Now what I want is solution that puts the power of CSS (or something like it) to work controlling the wrapping as it does in online Targets. But as best I can tell, those same attributes do NOT work in PDF / print. I submitted an enhancement request two+ years ago on this issue. My trial instance of Flare 2017 seems to indicate the problem still exists.

Cheers,
Riley
SFO
Last edited by Phlawm53 on Sun Apr 09, 2017 6:00 pm, edited 1 time in total.
Nita Beck
Senior Propellus Maximus
Posts: 3667
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Control wrap of long lines in PDF H/Fs?

Post by Nita Beck »

But if the length of the content exceeds the width of the container, what solution is there other than to widen the container? I don't mean to appear a stick in the mud...

And it has long been my observation that the PDF engine does not interpret CSS the same as browsers do, so what is a solution for web output may not translate into a solution for PDF.
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
Phlawm53
Sr. Propeller Head
Posts: 442
Joined: Tue Mar 16, 2010 10:58 am
Location: San Francisco, CA
Contact:

Re: Control wrap of long lines in PDF H/Fs?

Post by Phlawm53 »

Nita:
And it has long been my observation that the PDF engine does not interpret CSS the same as browsers do...
That was clearly stated in my original question.

So what I asked was whether anyone had found a way to control the behavior. Reformatting H/Fs isn't controlling it, merely circumventing specific instances of it.

Cheers,
RBV
SFO
doc_guy
Propellus Maximus
Posts: 1979
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West
Contact:

Re: Control wrap of long lines in PDF H/Fs?

Post by doc_guy »

Can you describe what you wish it would do instead?

You have a fixed amount of space for the content (the page). That space is further constrained by the two cell table at the top of your page layout.

If the content exceeds the amount of physical space available, what do you want to have happen? Should the header container get larger? Should the content shrink to a size so the text will fit? Maybe if we know what you are EXPECTING to happen, we can help find a solution to make it happen.
Paul Pehrson
My Blog

Image
Phlawm53
Sr. Propeller Head
Posts: 442
Joined: Tue Mar 16, 2010 10:58 am
Location: San Francisco, CA
Contact:

Re: Control wrap of long lines in PDF H/Fs?

Post by Phlawm53 »

doc_guy wrote:Can you describe what you wish it would do instead?
...
If the content exceeds the amount of physical space available, what do you want to have happen? Should the header container get larger? Should the content shrink to a size so the text will fit? Maybe if we know what you are EXPECTING to happen, we can help find a solution to make it happen.
I want Flare's PDF engine to recognize the CSS overflow: hidden;, white-space: nowrap; and text-overflow attributes. Repeated experiments have demonstrated that it doesn't, even into version 2017.

Here's the CSS:

Code: Select all

.truncate
{
  border: solid 1px magenta;
  width: 1.5in;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
The following screenshot illustrates the result in a very simple HTML5 document. Magenta borders identify where the effect has been applied to two P elements via class="truncate".
TruncatedText.png
It's not surprising that CSS works perfectly well in online Targets. But Flare's PDF engine doesn't recognize that CSS. If it did, then very long headings in PDF headers/footers would be truncated and have an ellipsis at the end. That's exactly what I want to happen.

I initially put in an Enhancement Request 'bout two years ago. I submitted another one the same day I created this post.

Cheers & thanks,
Riley
SFO
You do not have the required permissions to view the files attached to this post.
Last edited by Phlawm53 on Fri May 12, 2017 11:50 am, edited 2 times in total.
doc_guy
Propellus Maximus
Posts: 1979
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West
Contact:

Re: Control wrap of long lines in PDF H/Fs?

Post by doc_guy »

Thanks for that explanation. I haven't tried it, but I can see that you have, and that it doesn't work.

I don't know of a work around that would do what you are wanting, unfortunately. Hopefully MadCap will address this, based on your request in a future release.

If there are others who are reading this thread who think this is a good idea, please submit your own feature request to MadCap, as (like most companies) they tend to pay more attention to features that multiple customers are requesting.
Paul Pehrson
My Blog

Image
Phlawm53
Sr. Propeller Head
Posts: 442
Joined: Tue Mar 16, 2010 10:58 am
Location: San Francisco, CA
Contact:

Re: Control wrap of long lines in PDF H/Fs?

Post by Phlawm53 »

------
I thought for a brief second that I might have found the fix. But I was disappointed.

As explained in my original post, my headers and footers are composed of one-row, two-column tables. In the Table Style Editor, General tab, there is a setting named Overflow. That setting's options include Hidden.

Per the Flare Online Help, Editing Table Stylesheets page:
Hidden
The overflow is clipped, and the rest of the content will be invisible. If you are using border-radius properties on the table, you must select this option for the rounded corners to be seen properly.
I tried applying that to my header table. But at least in Flare 11 the setting appears to have no effect on the wrapping behavior. Sigh...

Cheers & hope this helps,
Riley
SFO

P.S. Today submitted yet another Enhancement Request that references this Forum post and includes a comment about the apparent lack of effect of the Table Style Editor's overflow setting. RBV
Phlawm53
Sr. Propeller Head
Posts: 442
Joined: Tue Mar 16, 2010 10:58 am
Location: San Francisco, CA
Contact:

Re: Control wrap of long lines in PDF H/Fs?

Post by Phlawm53 »

------
Even more information.

As part of researching another Flare-to-PDF problem I hand-edited a simple yet standards compliant HTML5 file, then created a PDF by importing that HTML5 file into Acrobat (9). I then observed that the resulting PDF correctly handled the CSS overflow: hidden;, white-space: nowrap;, and text-overflow: ellipsis; rules.
TruncatedTextInImportedPDF01a.png
The point being that there's nothing about PDFs that prevents them for handling these attributes. The problem therefore seems directly attributable to Flare's PDF engine.

Cheers & hope this helps,
Riley
SFO
You do not have the required permissions to view the files attached to this post.
doc_guy
Propellus Maximus
Posts: 1979
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West
Contact:

Re: Control wrap of long lines in PDF H/Fs?

Post by doc_guy »

Make sure you submit this to MadCap Support directly, attached to your feature request number or ticket number so they can have all the information in one place.
Paul Pehrson
My Blog

Image
Phlawm53
Sr. Propeller Head
Posts: 442
Joined: Tue Mar 16, 2010 10:58 am
Location: San Francisco, CA
Contact:

Re: Control wrap of long lines in PDF H/Fs?

Post by Phlawm53 »

doc_guy wrote:Make sure you submit this to MadCap Support directly...
Was informed via a 26 May, 2017 email exchange with Madcap sales and marketing that they are aware of my enhancement requests on this issue and that those enhancement requests cite this Forum thread. Here's hoping...

In the meantime I've recently encountered a couple of other useful XHTML / CSS constructs such as check boxes, options (a.k.a. radio) buttons, and lists that work great in XHTML but don't survive a journey through Flare's current PDF engine. Based on that it seems to me that the real solution is to significantly expand Flare's PDF engine to more fully support useful XHTML / CSS constructs. (Of course we've all "known" for ten years or so that PDF is "dead". The only folks that haven't gotten the message is the readership that keeps insisting on it...)

Cheers & hope this helps,
Riley
SFO
armplinker
Propeller Head
Posts: 21
Joined: Fri Oct 05, 2012 7:41 am
Location: Bedford MA

Re: Control wrap of long lines in PDF H/Fs?

Post by armplinker »

And I think this topic leads to the question of the execrable flexbox support in Flare continuing into the latest 2018 release.
It barely works for HTML5 and, explicitly stated elsewhere, not at all for PDF targets.

Why is providing this natively not a priority?
Phlawm53
Sr. Propeller Head
Posts: 442
Joined: Tue Mar 16, 2010 10:58 am
Location: San Francisco, CA
Contact:

Re: Control wrap of long lines in PDF H/Fs?

Post by Phlawm53 »

armplinker wrote:And I think this topic leads to the question of the execrable flexbox support in Flare continuing into the latest 2018 release.
It barely works for HTML5 and, explicitly stated elsewhere, not at all for PDF targets.

Why is providing this natively not a priority?
First, if there's a need to discuss "Flare should have better support for Flexbox", dare I suggest creating a new forum discussion?

OK, so: Is there any XHTML or XML tool that can generate Flexbox layouts on print pages? Does Flexbox even make sense for print?

I agree that broader support for de facto online standards would be a welcome addition to Flare's online Targets.

Online Targets because Flare is at heart a help authoring tool (HAT). PDFs always were and today are a secondary output. Yes, Flare's PDF engine has gaps that would be nice to fill in. But overall the great majority of users seem to be able to get good enough PDF out of Flare. If they need better PDFs they're better off going to FrameMaker or some other tool designed specifically to produce high quality print output.

So insofar as I don't perceive much of a market argument for providing Flexbox support in PDF Targets, my moderately informed precision guesswork tells me that Flare's PDF engine will never be redesigned to support Flexbox.

Cheers,
RBV
SFO
Post Reply