Pages Footer styling issues...
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 59
- Joined: Tue Sep 13, 2022 4:13 pm
Pages Footer styling issues...
Hi all!
Now I'm trying to make a footer in the format:
Almost done, but there are problems:
1) the middle block (company name) is divided into 2 lines by oXygen (but it should be in one line);
2) so far I can not find a way to display the total number of pages.
I make the footer like this (for left and right pages - the same principle):
If you can help with advice, I will be glad!
P.S. I'm using CSS for styling.
Now I'm trying to make a footer in the format:
Code: Select all
"Confidential Company Name Page This Page Number/Total Pages"
1) the middle block (company name) is divided into 2 lines by oXygen (but it should be in one line);
2) so far I can not find a way to display the total number of pages.
I make the footer like this (for left and right pages - the same principle):
Code: Select all
@bottom-left {
content: "Confidential"
}
@bottom-center{
content: "Company name bla bla bla, 2022"
}
@bottom-right{
content: "Page " counter (page);
}
P.S. I'm using CSS for styling.
-
- Posts: 922
- Joined: Thu May 02, 2019 2:32 pm
Re: Pages Footer styling issues...
Post by chrispitude »
Hi Dan,
At this page:
PDF Chemistry Home > Styling for Print > Page Formatting > The @Page Rule > Page Margin Boxes
notice it says the following for bottom-center:
Above the forum editor, there is a "code display" button (<>) that can format your code to preserve spaces.
If you scroll down on the main forum page, note that there is a dedicated area for PDF Chemistry questions, which is a good place for PDF/CSS-specific questions:
I don't know the answer to the question about the total number of pages.
I hope this helps!
At this page:
PDF Chemistry Home > Styling for Print > Page Formatting > The @Page Rule > Page Margin Boxes
notice it says the following for bottom-center:
I think you can temporarily add background colors to visualize your boxes:Using a bottom-center box together with a bottom-left or bottom-right will create a sequence of three areas of identical width, with the bottom-center box occupying the center.
Code: Select all
@bottom-left {
content: "Confidential";
background-color: yellow;
}
@bottom-center {
content: "Company name bla bla bla, 2022";
background-color: lightgreen;
}
@bottom-right {
content: "Page " counter (page);
background-color: lightblue;
}
If you scroll down on the main forum page, note that there is a dedicated area for PDF Chemistry questions, which is a good place for PDF/CSS-specific questions:
- Oxygen PDF Chemistry
- Feature Request - Are you missing a feature? Request its implementation here.
- Common Problems - Having trouble installing Oxygen PDF Chemistry? Got a bug to report? Post it all here.
I don't know the answer to the question about the total number of pages.
I hope this helps!
-
- Posts: 665
- Joined: Wed Oct 16, 2019 3:47 pm
Re: Pages Footer styling issues...
Post by julien_lacour »
Hi Dan,
For the total number of pages, the counter is simply called "pages", the CSS should be like this:
Here is a link to the topic related to the page counter.
Regards,
Julien
For the total number of pages, the counter is simply called "pages", the CSS should be like this:
Code: Select all
@bottom-right {
content: "Page " counter(page) "/" counter(pages);
background-color: lightblue;
}
Regards,
Julien
-
- Posts: 59
- Joined: Tue Sep 13, 2022 4:13 pm
Re: Pages Footer styling issues...
Thank you all very much, I understand everything. I also wanted to ask this: is there any way to preserve spaces when setting the text in the CSS in the footer?
Let me explain what I want to say: I make a line like this:
left-aligned, as suggested here.
For this, I tried two CSS settings and both did not work (the text in the final pdf was all merged - i.e. the system removed all spaces on its own):
The result (looks like, in both attempts):
How would I make it so that spaces are preserved and not destroyed by the system?
Let me explain what I want to say: I make a line like this:
Code: Select all
Confidential Company Name Page This Page Number/Total Pages
For this, I tried two CSS settings and both did not work (the text in the final pdf was all merged - i.e. the system removed all spaces on its own):
Code: Select all
@bottom-left
{
content: "Confidential Company Name Page " counter(page) "/" counter(pages);
}
Code: Select all
@bottom-left
{
content: "Confidential" " " "Company Name" " " "Page " counter(page) "/" counter(pages);
}
Code: Select all
ConfidentialCompanyNamePagecounter(page)/counter(pages)
Last edited by DAN SEA on Wed Oct 12, 2022 3:02 pm, edited 1 time in total.
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service