Bottom border disappeared in header

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.
Post Reply
chuck_agari
Sr. Propeller Head
Posts: 225
Joined: Wed May 30, 2018 2:40 pm

Bottom border disappeared in header

Post by chuck_agari »

I have a page layout with 4 pages: normal, first, title, and empty. I use only the first two. In the header of the normal page, I define a bottom border in the frame.

Today, when building a PDF, the bottom border disappeared, and I can't figure out why.

I realized that I can't conditionalize (AFAIK) anything in the page layouts (I wanted to conditionalize the color of these borders), so I simply copied the page layout and modified the copy (not optimal, I know). Looking at the code of the original, I noticed that the footer content element was not centered. This was the footer frame in the normal page:

Code: Select all

<Frame Flow="footer" Anchors="" Right="0in" X="0in" Y="9.25in" ColumnCount="1" PaddingLeft="0in" PaddingRight="0in" PaddingTop="0in" PaddingBottom="0in" FlowIndex="1" Height="0.5in" VerticalAlign="middle" TextAlign="center" BorderTopStyle="solid" BorderTopWidth="3pt" BorderTopColor="#f68d39" Width="6.5in" Bottom="-72px">
            <Content>
                <xhtml:html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" xmlns:xhtml="http://www.w3.org/1999/xhtml">
                    <xhtml:head>
                    </xhtml:head>
                    <xhtml:body>
                        <xhtml:p xhtml:style="text-align: center;">- <MadCap:variable xhtml:name="System.PageNumber" /> -</xhtml:p>
                    </xhtml:body>
                </xhtml:html>
            </Content>
        </Frame>


And this was the footer frame in the title page:

Code: Select all

<Frame Flow="footer" Anchors="" Right="0px" X="0in" Y="9.25in" ColumnCount="1" PaddingLeft="0in" PaddingRight="0in" PaddingTop="0in" PaddingBottom="0in" FlowIndex="1" Height="0.5in" BorderTopStyle="solid" BorderTopWidth="3pt" BorderTopColor="#f68d39" VerticalAlign="middle" TextAlign="center" Width="6.5in" Bottom="-72px">
            <Content>
                <xhtml:html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" xmlns:xhtml="http://www.w3.org/1999/xhtml">
                    <xhtml:head>
                    </xhtml:head>
                    <xhtml:body>
                        <xhtml:p>- <MadCap:variable xhtml:name="System.PageNumber" /> -</xhtml:p>
                    </xhtml:body>
                </xhtml:html>
            </Content>
        </Frame>


So, in Notepad++, I copied the attribute in the xhtml:p element from the normal page to the title page. Somewhere along the line in this process, when I was testing the PDF output, the border defined in the header disappeared. This is that code:

Code: Select all

<Frame Flow="header" Anchors="" Right="0in" X="0in" Y="-0.75in" ColumnCount="1" PaddingLeft="0in" PaddingRight="0in" PaddingTop="0in" PaddingBottom="0in" Height="0.5in" VerticalAlign="bottom" TextAlign="left" BorderBottomStyle="solid" BorderBottomWidth="3pt" BorderBottomColor="#f68d39" Width="6.5in" Bottom="888px">
            <Content>
                <xhtml:html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" xmlns:xhtml="http://www.w3.org/1999/xhtml">
                    <xhtml:body>Chapter <MadCap:variable xhtml:name="Heading.Level1" /></xhtml:body>
                </xhtml:html>
            </Content>
        </Frame>


At first I thought that the output was using the title page for everything, but the content still shows up, just not the rule at the bottom of the frame that indicates the divider between header and content. And I see the rule in the page layout editor. So I'm at a loss at this point to figure out what's going wrong.
ChoccieMuffin
Senior Propellus Maximus
Posts: 2630
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Bottom border disappeared in header

Post by ChoccieMuffin »

It can be a bit tricky spotting things in code like this, so I suggest you compare the HTML pages in something like Beyond Compare and see if you can identify the differences for the entire page layout. You might find that there is a tiny difference between the page that works properly and the page that doesn't.
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
chuck_agari
Sr. Propeller Head
Posts: 225
Joined: Wed May 30, 2018 2:40 pm

Re: Bottom border disappeared in header

Post by chuck_agari »

ChoccieMuffin wrote:It can be a bit tricky spotting things in code like this, so I suggest you compare the HTML pages in something like Beyond Compare and see if you can identify the differences for the entire page layout. You might find that there is a tiny difference between the page that works properly and the page that doesn't.
I think

Code: Select all

BorderBottomStyle="solid" BorderBottomWidth="3pt" BorderBottomColor="#f68d39"
is pretty clear. It defines exactly what should be rendered. And it appears in the Page Layout, just not in the output.

This only thing I really don't get is

Code: Select all

Bottom="888px"
This is a remnant from the default new page layout that I started with, and because the header dimensions were as I wanted them, I didn't change them. But not only do I not know what "Bottom" defines--and it's not in the documentation--for allegedly being experts in CSS (or at least as Mike claims to be), using pixels as units for print layouts is just plain wrong.
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: Bottom border disappeared in header

Post by NorthEast »

Would it not be a lot quicker just to set up a new page layout in Flare, rather than trying to manually edit the raw XML of the page layouts?
chuck_agari
Sr. Propeller Head
Posts: 225
Joined: Wed May 30, 2018 2:40 pm

Re: Bottom border disappeared in header

Post by chuck_agari »

Dave Lee wrote:Would it not be a lot quicker just to set up a new page layout in Flare, rather than trying to manually edit the raw XML of the page layouts?
I only went to look at the raw XML to confirm what I was seeing on the page layout page (from the department of redundancy department). I mean, that's what technically savvy people do when something does wrong that the UI does not fix. The bottom rule in the header shows up in the page layout UI (as does the top rule in the footer). The code looks the same. Both were showing up, yet one now does not (the header one), while one does (the footer one).

I did end up tweaking the header (in the frame properties) to make it vertically centered so that its text does not render so close to the body, so there's white space that marks a clear separation now, but the issue still is, why is was being rendered in the PDF output and now it is not when nothing in the header was changed.
ajturnersurrey
Sr. Propeller Head
Posts: 346
Joined: Fri Nov 05, 2010 3:30 am

Re: Bottom border disappeared in header

Post by ajturnersurrey »

I have found a few quirks like this with page layouts.

Copying and pasting any footer/header content from one page layout to another, whitespace and formatting, like your center instruction, regularly goes missing - I assume this is just a bug.

The bigger danger seems to be copying and pasting decoration items, then finding you have a clash of FlowIndex= numbers or Flow= names, because text in the decorations follows that flow. This caused words in a decoration to seemingly inexplicably display in pdf on one page type, but not on another.
Post Reply