Can't make empty pages work in PDF output

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.
Post Reply
AnnaK
Propeller Head
Posts: 12
Joined: Mon Oct 17, 2011 6:14 am

Can't make empty pages work in PDF output

Post by AnnaK »

Here is the scenario. It is very classical like the one in Flare help but it doesn't work for me.
I have a document with chapters and I want every chapter to start on the right page. So I have the following page layouts:
Chapter -type first
Right- type right
Left - type left

And the following TOC structure

Chapter 1
--page 1
--page 2
Chapter 2

I want to have an empty page inserted before Chapter 2. So this is what I set in the TOC item properties:

Chapter 1
--page 1 - type: Left and assign a pagelayout with the type left to it
--page 2 - type: Right and assign pagelayout with type right to it
Chapter 2 - type: First and assign pagelayout with type first to it

I expect an empty page added before Chapter 2 but I don't get it there. What am I doing wrong?
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Can't make empty pages work in PDF output

Post by LTinker68 »

First of all, you need to add a page type of Empty to your page layout.

Second of all, you don't need to assign page layouts to the page 1 and page 2 under Chapter 1. If the page layout associated with Chapter 1 includes the first, right, left, and empty pages, then you set the TOC Properties for Chapter 1 to start a new chapter, select your page layout, select the First page, and enable the auto-end on left field. You leave the TOC Properties for page 1 and page 2 to default (everything grayed out) so they inherit from Chapter 1. They'll automatically select the appropriate page type depending on where the content falls within the chapter. If the last page of Chapter 1 falls on a right page, then a blank page will be inserted automatically. If the chapter will end on the left page, then no empty page will be inserted, because Chapter 2 will naturally fall on a right page.

If you want, you can include "Page intentionally blank" text on the Empty page of the page layout.

So the TOC Properties would now be:
Chapter 1 -- Start a new chapter, your page layout, First page, auto-end on left enabled, chapter number to whatever format you want
-- first topic (nothing)
-- second topic (nothing)
Chapter 2 -- Start a new chapter, your page layout, First page, auto-end on left enabled, chapter number continues
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
AnnaK
Propeller Head
Posts: 12
Joined: Mon Oct 17, 2011 6:14 am

Re: Can't make empty pages work in PDF output

Post by AnnaK »

Hi LTinker68! Thank you for your help!

First of all, I did forgot to mention that I have a pagelayout with an empty type set for it. But I still don't get the right result. And I have some questions:
If the page layout associated with Chapter 1 includes the first, right, left, and empty pages,
How one pagelayout can have first, right, left and empty pages? I thought they all should be different pagelayouts of different types. Do I get this wrong?
The problem is that I want every page withing one chapter to start with a new page. And if I follow the steps you provided I get them all go together. And the first page layout is applied to all the other pages in this chapter. I have the following pagelayouts:
Empty.flpgl
Left.flpgl
Right.flpgl
First.pgl
And here is what I set in the TOC entry properties:
Chapter 1 -- Start a new chapter, First.flpgl, auto-end on left enabled
-- first topic (nothing)
-- second topic (nothing)
Chapter 2 -- Start a new chapter, your page layout, First page, auto-end on left enabled, chapter number continues

And by having this set I got the same pagelayout for the all the topics within the chapter1 (first topic, second topic). What I want to get is:

Chapter 1- starts from the new page, has First.flpgl applied
--first topic - starts from the new page and has Left.flpgl applied
--second topic - starts with new page and has Right.flpgl applied
--Empty page
Chapter 2...
I can't make the topics start with a new page by setting H2 styles in the css. Since I have H2 style three times on one page. And I want all of them on one page.

I might be missing something really global.
ChoccieMuffin
Senior Propellus Maximus
Posts: 2650
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Can't make empty pages work in PDF output

Post by ChoccieMuffin »

It seems the problem is with the way you've used your stylesheet.

You might need to have another style. If most of your h2s start on a new page, set the attribute page-break-before to "always" and then create h2.nobreak (or create a global style .nobreak) which has the attribute page-break-before: avoid;. You can then apply this style to the h2 paragraphs that you don't want to start on a new page. Or if most of your h2s are supposed to start on a new page just one or two that don't, do it the other way and have the attribute in h2 set to "avoid" and then create h2.break (or global .break) with that attribute set to "always", so you can apply that style to the few that you DO want to start on a new page.

The advantage of creating a global style is that you can apply it to any paragraph or heading, not just h2.

Hope that helps.
Started as a newbie with Flare 6.1, now using Flare 2024r2.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
AnnaK
Propeller Head
Posts: 12
Joined: Mon Oct 17, 2011 6:14 am

Re: Can't make empty pages work in PDF output

Post by AnnaK »

Thanks a lot ChoccieMuffin! I will try this out! I think it might solve the problem with page breaks. But then how do I apply left and right paglayouts to this pages?
ChoccieMuffin
Senior Propellus Maximus
Posts: 2650
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Can't make empty pages work in PDF output

Post by ChoccieMuffin »

That SHOULD happen automatically, I think. Give it a go with the styles first, then see what happens. (Voice of a novice speaking!)
Started as a newbie with Flare 6.1, now using Flare 2024r2.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
AnnaK
Propeller Head
Posts: 12
Joined: Mon Oct 17, 2011 6:14 am

Re: Can't make empty pages work in PDF output

Post by AnnaK »

Just tried out! The page breaks are fine. But now both pages that go after the chapter page have First page layout assigned. Here is how everything is set now.
Chapter 1 - First page type, First.flpgl applied
--page 1 - no settings. This page has two H2 heading to tell where to make a page break

In the generated output I get the following:

Chapter 1 - First flpgl applied
--page1 - First flpgl applied
--page2 - First flpgl applied
... and all the following pages in this chapter only get First flpgl applied.
lacastle
Propellus Maximus
Posts: 1028
Joined: Thu Apr 12, 2007 7:28 am
Location: Wilmington, DE
Contact:

Re: Can't make empty pages work in PDF output

Post by lacastle »

You can have 1 page layout with First, Left, Right, and Empty page types in it, so that when you apply that page layout to your chapter, it will use all the page types you created. here is the text from the flare help - http://webhelp.madcapsoftware.com/flare ... ayouts.htm
Each page layout that you create can consist of one page or several pages. Why would you want more than one page? If you want different content or settings to be applied to the various pages in your final output—depending on their position in the document—you will want multiple pages. In this way, page layouts are different from master pages, where you designate first, left, or right page content on the same master page.

For each page in a page layout, you can designate one of the following types, which determines the behavior of the page:

Normal Select this type if you do not want a right-left type of page flow, but instead just want the same layout on every page, perhaps like a screenplay. Unlike "First," "Right," or "Left," if you elect to begin a chapter with the "Normal" page, that page will be used throughout that chapter.
First Select this type if you want the settings to be applied to a page in the output when it appears on the first page of a new chapter (or designated section).

Empty Select this type if you want the settings to be applied to an "empty" page in the output. When creating a printed manual, there may be times when you want a page in the document to purposely be left blank (or mostly blank). If you create an Empty page in a page layout, it will automatically be used in the output if necessary, based on the page types in your layout. For example, if you also have a Title page in the layout, the Empty page will be inserted immediately after the title page in the output. Or let's say you have a First page type in your layout, with the intention of using it to start each new chapter on a right page in the output. If you also have an Empty page type in the layout, it will automatically be inserted before the first page of a new chapter, if necessary, to ensure that it starts on a right (odd) page. For more information see Using Empty Pages.

Note: The empty page type is not supported in Microsoft Word output.
Left Select this type if you want the settings to be applied to a page in the output when it appears on a left (or even) page (e.g., page 42).
Right Select this type if you want the settings to be applied to a page in the output when it appears on a right (or odd) page (e.g., page 43).
Title Select this type if you want the settings to be applied to the first page in your output, which typically displays the manual title. If you include an Empty page in your page layout, the title page in the output will immediately be followed by the empty page.

example

Let's say that you are creating a page layout to be used only for the title page that occurs at the very first page of your manual. In that case, your page layout might have one page that uses the Title page type. In addition, you can add an Empty page type to that layout. In the output, the Title page will automatically be followed by an empty page.

Now let's say that you are creating a second page layout to be used for the chapters in your document. Suppose that on the first page of each chapter, you do not want any header, but you want a page number at the bottom-right of the page. Therefore, you create one page with a page type of First.

Next, suppose you want the pages that appear on the left side of the document to have the name of the manual in the upper-left corner and a page number in the lower-left corner. Therefore, you create another page with a page type of Left.

Perhaps you want the pages that appear on the right side of the document to have the chapter name of the manual in the upper-right corner and a page number in the lower-right corner. Therefore, you create another page with a page type of Right.

Finally, let's say you want to ensure that the first page of each chapter starts on the right side of the manual. In that case, you can create a fourth page with a page type of Empty. This allows an empty page to be forced (if necessary) on the left side immediately before the beginning of the next chapter.
AnnaK
Propeller Head
Posts: 12
Joined: Mon Oct 17, 2011 6:14 am

Re: Can't make empty pages work in PDF output

Post by AnnaK »

Thank you so much, lacastle! This is the main part of the puzzle I was missing! Now I am sure I'll be able to make it!

Thank you everybody for help!
MPF
Propeller Head
Posts: 18
Joined: Wed Feb 20, 2013 2:52 pm

Re: Can't make empty pages work in PDF output

Post by MPF »

I've read through this whole thing. I think I've got everything covered. I've got:
  • A "front matter" page layout that includes an empty page, title page, left page, and right page
  • A "chapters" page layout that includes an empty page, first page, left page, and right page
  • "Title–Contents" chapter break set up with "front matter", lowercase numerals, and auto-end on left enabled
  • "Chapters" chapter break set up with "chapters", lowercase numerals, and auto-end on left enabled
I'm not getting an empty page between the end of my "front matter" and the start of my "chapters". "Page one", a "Welcome" topic, is starting on literal page 6 of the PDF.

The only thing I can think of is that I'm restarting the page numbering to 1 so I can reformat to decimal. Is that going to screw this up and leave out the blank page?

EDIT: I just tested with continuing the numbering and it seems to still not throw in the blank page, but at least here the page number is even.

EDIT 2: Okay, so now I've got it inserting blank pages, but it's not lining up correctly with my page numbering because I'm restarting what would be an even page as my new page 1. Any way to fix this?

EDIT 3: More unexpected behavior. So I figured I could force it to line up with "page 1" on an odd page by inserting a blank topic (with a blank "first" layout) before my page one. And it worked. Twice. So now I have a manual blank topic...followed by an empty page. :(

RESOLVED: It's because I had a title page with no empty because I wanted the back of it to have a "copyright" on it, and did that with a separate topic instead of an "empty" template page. And yet I had "force end on left" or whatever enabled. so that was throwing everything off. Now I just need to figure out how to add text to an empty and have it actually show up.

RESOLVED 2: And I fixed that too. Frame just needed to be bigger. Thanks everyone for letting me talk myself through this. :)
Post Reply