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.

Box style mangled for PDF?

Postby sstraw on Tue Dec 02, 2008 5:52 pm

(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:

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

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

margin-left: 1.5em;

font-weight: bold;
font-style: normal;
font-family: monospace;





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 class="Example Indent Box">
<p class="Userentry">command /switch optionvalue</p>
<p class="Example Indent">Does something.</p>

The snippet file referred to above contains:

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

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?
Jr. Propeller Head
Posts: 9
Joined: Tue Sep 23, 2008 7:24 am

Re: Box style mangled for PDF?

Postby LTinker68 on Wed Dec 03, 2008 9:25 am

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.

Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
Master Propellus Maximus
Posts: 7245
Joined: Thu Feb 16, 2006 9:38 pm

Return to Printed Documentation Targets

Who is online

Users browsing this forum: No registered users and 8 guests