Page 1 of 1

Show total number of pages

Posted: Wed Mar 08, 2017 9:24 am
by db5ced
My page numbering is correct but on the front cover I want to show how many pages in total are in my document. How do I do this?

Thanks

Re: Show total number of pages

Posted: Thu Mar 09, 2017 5:41 am
by Rene Severens
Hi,

For output = PDF you could use a PageLayout.
Add a footer and position it at the correct location on the page.
Press F2 to go to edit mode
Enter some text like, for example:

Number of pages =

In the menu INSERT, select VARIABLE,
In VARIABLE SETS, select SYSTEM
Select PageCount and click OK

You will see "Number of pages = [PageCount: 1]

Save and build and check the output.

Greetings,
René Severens



and save.

Re: Show total number of pages

Posted: Thu Mar 09, 2017 6:58 am
by db5ced
Thanks Rene. I have done this but when I build my project it still only shows my Page Numbers as 1, even though I currently have 10. All 10 pages have the correct page numbers at the bottom as well so that part is working. The pagecount doesn't seem to be adding them up though.

Any ideas why this might be?

Cheers

Re: Show total number of pages

Posted: Thu Mar 09, 2017 2:30 pm
by SteveS
Are you doing something funky like starting your page numbers on a page other than the cover? For example, I've used Roman Numerals for the front matter before resetting the page numbering and using Arabic numbers. If so PageCount could be picking up on the total pages for that section, rather than the content.

Re: Show total number of pages

Posted: Fri Mar 10, 2017 1:57 am
by db5ced
I don't think I am familiar enough with Madcap to do anything 'funky' with it. My Pagecount is on the coverpage and the first page number is also showing on the coverpage. Although once I have this sorted I might try to hide the coverpage page number. It shows the number 1 in edit mode and the number 1 in PDF format once built. Do I need to do something with the TOC to make it recognise the other pages? Each page in my document is a different topic but they all come together into one PDF using the TOC.

Re: Show total number of pages

Posted: Fri Mar 10, 2017 3:05 am
by Rene Severens
Hi,

The steps I usually do for the frontpage are:
I create a frontpage topic and add it as first in the TOC. My second topic in the TOC only contains a tocProxy and next are the topics,
I create a pagelayout in which I add a footer in which the variable PageCount is added.
In the TOC, I right-click the added frontpage and select properties
On tab Auto-numbers I set Chapter number to "Increment number", and as specified in this section top line of text, I also select tab Printed Output and set Break type to Page Layout Break.
Also in this tab I select the created page layout, and in case using a pagelayout that has multiple pages, at Page type I select the name of the pagelayout page to use, commonly named Title.
And finally, in this same tab in section "Section Break", this option must be cleared.

These are all steps as found in the Flare manual and until today they worked as intended. But it is very detailed, so maybe you missed a step?
Can you indicate if you did something different?

Greetings,
René Severens

Re: Show total number of pages

Posted: Fri Mar 10, 2017 3:29 am
by db5ced
My second page does not include a tocProxy. Not sure what that is. My pagecount is not in the footer it is on the main section of the page. I have the Chapter Number to Increment. I didn't have a break type on my coverpage but I tried changing it to Page Layout Break and it didn't make any difference. The Section Break section was greyed out.
elect the created page layout, and in case using a pagelayout that has multiple pages, at Page type I select the name of the pagelayout page to use, commonly named Title.
And finally, in this same tab in section "Section Break", this option must be cleared.


I have the Flare 12 developers guide, is this the same as the Flare manual? I can't see anything about doing this in the book.

Re: Show total number of pages

Posted: Mon Mar 13, 2017 9:49 am
by db5ced
My apologies. I do have a tocProxy although it is about 4 pages in as I have a load of warnings and certification stuff that needs to come first. I still haven't worked the answer out to my original question. Does anyone else have ideas?

Re: Show total number of pages

Posted: Mon Mar 20, 2017 3:31 am
by db5ced
I am still stuck with this issue. Is there anyone out there who can help me? It seems like it should be a very simple fix. I can post code or whatever if it would help.

Re: Show total number of pages

Posted: Tue Mar 21, 2017 6:40 am
by db5ced
If there is nobody who can help does anyone know where I could go to find help?

Re: Show total number of pages

Posted: Tue Mar 21, 2017 1:09 pm
by paintedturtle
db5ced wrote:If there is nobody who can help does anyone know where I could go to find help?
A screenshot or code would be helpful.

Does the top of your page have a "MapCap variable" when you are viewing the footer with the page count info in it? And are there brackets with arrows indicating you are viewing a variable?

Re: Show total number of pages

Posted: Wed Mar 22, 2017 2:31 am
by db5ced
The code for the pagecount is below.

<p class="coverpage">TOTAL NUMBER OF PAGES</p>
<p class="coverpage"><MadCap:variable name="System.PageCount" style="color: #000000; font-size: 10pt;" />
</p>

It doesn't allow me to post a screenshot but on the actual page it just shows the number "1".

Re: Show total number of pages

Posted: Wed Mar 22, 2017 10:01 am
by Rene Severens
Hi,

Just to try and see it work:

I added a footer on the first page of the pagelayout and inside that footer I inserted the variable. This works:

On the page layout used for the frontpage:
Pagelayout.png
and the result in the output:
Result on frontpage.png
It seems the variable expects xhtml:name=PageCount and this cannot be added to a page. (there is will show as name=PageCount, missing the xhmtl: part.), it seems it must be added into the footer of the first page in the pagelayout that is selected to be used for the first topic (titlepage).

Greetings,
Rene Severens

Re: Show total number of pages

Posted: Wed Mar 22, 2017 12:33 pm
by paintedturtle
db5ced wrote:The code for the pagecount is below.

<p class="coverpage">TOTAL NUMBER OF PAGES</p>
<p class="coverpage"><MadCap:variable name="System.PageCount" style="color: #000000; font-size: 10pt;" />
</p>

It doesn't allow me to post a screenshot but on the actual page it just shows the number "1".
Okay, I think you're missing part of the code you want. Mine looks like this:

<xhtml:body>
<xhtml:p xhtml:class="bodyRight"><xhtml:span xhtml:class="Emphasis"><xhtml:span xhtml:class="IntenseEmphasis">DRAFT</xhtml:span> Abbott Diagnostics Confidential Service Document, Alinity h-series</xhtml:span>
</xhtml:p>
<xhtml:p xhtml:class="bodyRight"><xhtml:span xhtml:class="Emphasis">Page <MadCap:variable xhtml:name="System.PageNumber" /> of <MadCap:variable xhtml:name="System.PageCount" /></xhtml:span>
</xhtml:p>
</xhtml:body>
</xhtml:html>

Adding <MadCap:variable xhtml:name="System.PageCount" /> should help, as that would be out of how many pages.

Re: Show total number of pages

Posted: Thu Mar 23, 2017 2:43 am
by db5ced
It works in the footer. It shows "Page 1 of 66". It is on the main part of the page it does not work. The template that is used by my company requires the total number of pages to be displayed as part of the front cover of documents and it is here that it is not working. How do you paste screenshots and I can display what mine looks like?

Re: Show total number of pages

Posted: Thu Mar 23, 2017 3:25 am
by Dee Vincent-Day
ADDING IMAGES TO A POST

You need to save the screen shot as a file and then click the upload attachment tab, which you will find below the section where you type the content of your post.
upload attachment.jpg
Now you need to go and select your file to do this click choose file.
Upload Attachment Choose file.jpg
Once you have selected your file click Add the File.
upload attachment add file.jpg
If you want the screen shot in the body of your post, click in the position you want it to appear in your post. you should see an insertion point on the screen. Look for the Posted Attachments Section and click Place Inline.
Upload Attachment Place Image.jpg
You can add more than one image and all attached images appear in the Posted Attachments section of the screen.
Posted Attachments.jpg

Re: Show total number of pages

Posted: Thu Mar 23, 2017 4:54 am
by db5ced
Okay, thanks
Picture1.png
As you can see the footer is displaying correctly, but the main page is not.

The code is as below:
Picture1.png

Re: Show total number of pages

Posted: Thu Mar 23, 2017 5:00 am
by ChoccieMuffin
Could you "fudge" it so that the bit that looks as if it's in the body of the page is actually in the footer?

In the page layout, change the sizes of the body frame and footer frame to make the first smaller and the second larger, then put the "TOTAL NUMBER OF PAGES" bit in the footer instead.

Re: Show total number of pages

Posted: Thu Mar 23, 2017 6:45 am
by db5ced
I could. Does that mean it is impossible to show the number of pages on the main part of a document?

Re: Show total number of pages

Posted: Thu Mar 23, 2017 7:53 am
by Rene Severens
Hi,

You could also add an additional header frame on the page in the page layout used for the frontpage.
The xhtml part is added when adding content to a frame in a page of the page layout.
So I guess it only works inside frames

Greetings,
Rene Severens

Re: Show total number of pages

Posted: Thu Mar 23, 2017 9:02 am
by db5ced
I'm sorry, I am not particularly familiar with CSS and don't understand what you are saying regarding frames. I am struggling to see the benefit of using this over Word. It makes so many things more difficult to do it is driving me nuts but that's off topic so I will leave it there.

I tried inserting another footer and it still didn't work. I think I am just going to have to manually type the number of pages in. Oh how I long for the easy usability of Word.

Re: Show total number of pages

Posted: Fri Mar 24, 2017 2:14 am
by Rene Severens
Hi,

Flare has a high / steep learning curve.

About the frames I mentioned:
I assumed (and that can be dangerous) that you use a pagelayout for the pages in your document.
The pagelayouts are stored in the Content folder\ Resources \ PageLayouts - there is Default pagelayout.
If you open that one, you will see a page with a header, a body and a footer, these are the frames I am talking about.
From the menubar in this tab you can add frames by clicking the blueish icon.
You can position the frames on the page, resize them, and add some content to the header and footer frame.
The body frame is used to indicate the space available for showing the content of the topic, that is using this page layout.
To assign a page layout to a topic, right-click the topic in the TOC you have created and select the pagelayout. If you added different page types to the pagelayout, then you also select the name of the page type you created.

You can create 1 pagelayout file that contains different page types, or create different pagelayout files that only contains 1 page type. In this last case you must select the different pagelayout to assign to a topic.

Hope this helps.

Greetings,
René Severens

Re: Show total number of pages

Posted: Fri Mar 24, 2017 4:00 am
by db5ced
Okay, so I have created a seperate pagelayout just for the coverpage. I have applied the pagelayout but when I build the pdf it is still showing the old pagelayout. Is there something else I need to change somewhere?