Customize cover page
Having trouble installing Oxygen PDF Chemistry? Got a bug to report? Post it all here.
-
- Posts: 6
- Joined: Tue Jun 12, 2018 3:32 pm
Customize cover page
Hi,
I'd like to use Oxygen PDF chemistry to create a PDF from a Dita map and I have some problems with the cover page. I'd like to have a line above the title name that shall be as long as the title itself. Actually this can be achieved by adapting the p-front-page.css: Just adding to the front-page-title: display: inline; border-top: 8px solid red; However, if I add further pseudo elements with front-page-title:after, the display:inline property is overwritten and the line is extended over the whole page. How is the title page created? Is it possible to add an additional element to the title page that can be styled individually? Thank you very much.
[Codebox=] front-page {
page: front-page;
}
front-page-title {
display:inline;
text-align:left;
margin-top: 3em;
font-size:40pt;
font-family:"akkurat pro", helvetica, sans-serif;
font-weight:100;
color:red;
border-top:8px solid red;
}
front-page-title:after(1) {
display:inline;
content:"\2002";
border-top:none;
clear:both;
font-size: 26pt;
color: gray;
}
front-page-title:after(2) {
display:block;
content:"\2002""\a""Benutzerhandbuch""\a""Version 4.36";
clear:both;
font-size: 26pt;
color: gray;
}[/Codebox]
I'd like to use Oxygen PDF chemistry to create a PDF from a Dita map and I have some problems with the cover page. I'd like to have a line above the title name that shall be as long as the title itself. Actually this can be achieved by adapting the p-front-page.css: Just adding to the front-page-title: display: inline; border-top: 8px solid red; However, if I add further pseudo elements with front-page-title:after, the display:inline property is overwritten and the line is extended over the whole page. How is the title page created? Is it possible to add an additional element to the title page that can be styled individually? Thank you very much.
[Codebox=] front-page {
page: front-page;
}
front-page-title {
display:inline;
text-align:left;
margin-top: 3em;
font-size:40pt;
font-family:"akkurat pro", helvetica, sans-serif;
font-weight:100;
color:red;
border-top:8px solid red;
}
front-page-title:after(1) {
display:inline;
content:"\2002";
border-top:none;
clear:both;
font-size: 26pt;
color: gray;
}
front-page-title:after(2) {
display:block;
content:"\2002""\a""Benutzerhandbuch""\a""Version 4.36";
clear:both;
font-size: 26pt;
color: gray;
}[/Codebox]
-
- Posts: 501
- Joined: Mon Feb 03, 2003 10:56 am
Re: Customize cover page
Hello Thomas,
The :after pseudo elements are "inside" the front-page-title, that is why the top border extends and covers the entire width. I propose the following workaround:
- In your DITA Map, locate the <title> element and wrap its content in a <ph outputclass="bordered"> element.
- In the CSS use:
I used the CSS selectors to make sure the CSS will be compatible with the new oXygen 20.1 that will be released in a couple of days:
The :after pseudo elements are "inside" the front-page-title, that is why the top border extends and covers the entire width. I propose the following workaround:
- In your DITA Map, locate the <title> element and wrap its content in a <ph outputclass="bordered"> element.
Code: Select all
<map>
<title><ph outputclass="bordered">Growing Flowers</ph></title>
...
- In the CSS use:
Code: Select all
*[outputclass~="bordered"] {
display: inline;
margin-top: 3em;
font-size: 40pt;
font-family: "akkurat pro", helvetica, sans-serif;
font-weight: 100;
color: red;
border-top: 8px solid red;
}
*[class~="front-page/front-page-title"],
front-page-title{
text-align: left;
display:block;
}
*[class~="front-page/front-page-title"]:after(1),
front-page-title:after(1) {
display: block;
content: "\2002";
border-top: none;
clear: both;
font-size: 26pt;
color: gray;
}
*[class~="front-page/front-page-title"]:after(2),
front-page-title:after(2) {
display: block;
content: "\2002" "\a" "Benutzerhandbuch" "\a" "Version 4.36";
clear: both;
font-size: 26pt;
color: gray;
}
Code: Select all
*[class~="front-page/front-page-title"],
front-page-title {
..
}
-
- Posts: 156
- Joined: Sat Feb 26, 2005 12:09 am
- Location: USA
- Contact:
Re: Customize cover page
Post by shudson310 »
I'm trying to add a logo to the cover, and build the publication title, but am only seeing the booktitle contents display.
Here's the variables I set:
Based on the earlier thread, I'm trying to use:
However, all I am getting is the value of booktitle centered on the page. What am I missing?
Here's the variables I set:
Code: Select all
:root {
font-family: 'Helvetica Neue', sans-serif;
font-size:10pt;
string-set: prodname oxy_xpath("//bookmeta//prodinfo/prodname");
string-set: prodversion oxy_xpath("//bookmeta//prodinfo/vrmlist/vrm/@version") "." oxy_xpath("//bookmeta//prodinfo/vrmlist/vrm/@release") "." oxy_xpath("//bookmeta//prodinfo/vrmlist/vrm/@modification");
string-set: category oxy_xpath("//bookmeta//category[last()]");
string-set: creationdate oxy_xpath("//bookmeta//created/@date[1]");
string-set: copyrfirst oxy_xpath("//bookmeta/bookrights/copyrfirst/year");
string-set: copyrlast oxy_xpath("//bookmeta/bookrights/copyrlast/year");
string-set: companyname oxy_xpath("//bookmeta/bookrights/bookowner/organization");
string-set: bookrights oxy_xpath("//bookmeta/bookrights/summary");
string-set: permission oxy_xpath("//bookmeta/permissions/@view");
}
Code: Select all
front-page {
page: front-page;
}
front-page-title{
color:transparent;
font-size: 2em;
width: 80%;
font-weight:bold;
margin-left:auto;
margin-right:auto;
content:none;
}
front-page-title:before(3) {
content: url("../../images/logo.print.png");
display:block;
padding-left: 0px;
padding-top: 20px;
}
front-page-title:before(2){
content: string(prodname) string(prodversion) !important;;
display:block;
color:black;
}
front-page-title:before(1){
content:string(category);
display:block;
color:black;
}
Scott Hudson
Staff Content Engineer
Site: docs.servicenow.com
Staff Content Engineer
Site: docs.servicenow.com
-
- Posts: 501
- Joined: Mon Feb 03, 2003 10:56 am
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