Box style mangled for PDF?

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.
Post Reply
sstraw
Jr. Propeller Head
Posts: 9
Joined: Tue Sep 23, 2008 7:24 am

Box style mangled for PDF?

Post by sstraw »

(this could probably be posted to the style group instead, but since it works properly for HTML output, I'm left to figure it is more likely a PDF issue.

Consider the following style definitions:

.Box
{
width: 90%;
padding: 10px;
border: 2px solid #000;
margin: 15px;
background: #EEE;
}

.SmBox
{
width: auto;
text-align: center;
padding: 2px;
padding-left: .5em;
padding-right: .5em;
border: 1px solid #000;
margin: .5em;
background: #BEB;
}

.Indent
{
margin-left: 1.5em;
}

.Userentry
{
font-weight: bold;
font-style: normal;
font-family: monospace;
}

p.Modes
{

}

p.Example
{

}


Yes, p.Example and p.Modes are devoid of attributes - the classes really have more to do with the heading for those (and other) sections, but for consistency, the paragraphs associated with sections bear the same class name, but don't happen to have the same attributes as the header. This is so that later, the styles can be popped en-mass as needed.

Then the following code (in part) found in any of a number of topics:

<div class="Modes Indent">
<MadCap:snippetBlock src="../Resources/Snippets/Option.Live.flsnp" />
</div>


<div class="Example Indent Box">
<p class="Userentry">command /switch optionvalue</p>
<p class="Example Indent">Does something.</p>
</div>


The snippet file referred to above contains:

<?xml version="1.0" encoding="utf-8"?>
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="2" MadCap:lastHeight="102" MadCap:lastWidth="884">
<head><title></title>
</head>
<body>
<span style="color: #6060CC;" class="SmBox"><a href="../../relative_url_reference_to_a_topic">Live</a></span>
</body>
</html>


Yes, the colour in the snippet is gaudy. It is supposed to be that way until someone on the project provides a spec otherwise (this way, it stands out).

In WebHelp output, this appears as a small box around the "Live" text, and the Example has a dull grey box around it. Appears just as one would expect the CSS to render it.

The PDF output however, leaves something to be desired. I have NO indentation on the example, no grey box. The modes have the text, and a lame excuse of a box rendered about midway through them, without a fill colour.

Surely, I'm doing something wrong, but I cannot figure out what it is. If I take the URL of one of the WebHelp pages and hand it over to Acrobat Pro to create a PDF from, it comes out reasonably similar - spacing is wrong and there's no border around the SmBox, but otherwise, it looks like a reasonable PDF equivalent of the webpage. So, how come Flare isn't cranking out a PDF that looks similar?
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Box style mangled for PDF?

Post by LTinker68 »

You might have to modify the style but only for the print medium. So in the print medium in the stylesheet, use points or inches instead of pixels, add an indent by adding a margin-left property, etc. You might have to set a specific width instead of using a percentage, too.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
Post Reply