customize PDF output
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 158
- Joined: Fri Nov 10, 2017 8:16 am
customize PDF output
Hi, I want to add a customized PDF cover.
I followed by your suggestion, go to https://github.com/radu-pisoi/com.oxyge ... ion.sample and download the sample project as a zip file.
I tested the sample project. The PDF cover was changed successfully.
But still have some problem with the PDF output:
1: The section title, topic title don't show correctly if the language is Chinese. It shows ### instead of Chinese characters.
2: How to remove "Chapter X" before the 1st-level title?
For now, the 1st-level titles show as below:
Chapter 1. Introduction
Chapter 2. Getting Started
Chapter 3......
I want to remove the default "Chapter X", and display as:
Introduction
Getting Started
......
How to do that?
Thanks for your any response!
I followed by your suggestion, go to https://github.com/radu-pisoi/com.oxyge ... ion.sample and download the sample project as a zip file.
I tested the sample project. The PDF cover was changed successfully.
But still have some problem with the PDF output:
1: The section title, topic title don't show correctly if the language is Chinese. It shows ### instead of Chinese characters.
2: How to remove "Chapter X" before the 1st-level title?
For now, the 1st-level titles show as below:
Chapter 1. Introduction
Chapter 2. Getting Started
Chapter 3......
I want to remove the default "Chapter X", and display as:
Introduction
Getting Started
......
How to do that?
Thanks for your any response!
-
- Posts: 501
- Joined: Mon Feb 03, 2003 10:56 am
Re: customize PDF output
Hello,
To remove the chapter labels from the table of contents and titles, please add these selectors to your customization CSS:
Please read more about fonts here:
https://www.oxygenxml.com/doc/versions/ ... aid-title3
The ideea is to declare fonts capable of rendering Chinese characters and/or add fallback fonts to the titles. This is an example:
Let me know if you need more information.
Many regards,
Dan
To remove the chapter labels from the table of contents and titles, please add these selectors to your customization CSS:
Code: Select all
/* Titles in the TOC. */
*[class ~= "map/topicref"][is-part] > *[class ~= "map/topicmeta"] > *[class ~= "topic/navtitle"]:before{
content:none !important;
}
*[class ~= "map/topicref"][is-chapter]:not([is-part]) > *[class ~= "map/topicmeta"] > *[class ~= "topic/navtitle"]:before{
content:none !important;
}
/* Titles in the content. */
*[class ~= "topic/topic"][is-part] > *[class ~= "topic/title"]:before {
content:none !important;
}
*[class ~= "topic/topic"][is-chapter]:not([is-part]) > *[class ~= "topic/title"]:before {
content:none !important;
}
https://www.oxygenxml.com/doc/versions/ ... aid-title3
The ideea is to declare fonts capable of rendering Chinese characters and/or add fallback fonts to the titles. This is an example:
Code: Select all
*[class~= "topic/title"] {
font-family: Calibri, SimSun, "Malgun Gothic";
}
Let me know if you need more information.
Many regards,
Dan
-
- Posts: 158
- Joined: Fri Nov 10, 2017 8:16 am
Re: customize PDF output
Thanks, Dan.
Your suggestions helped me!
But, still have one question.
If I have Chinese character in "codeph" attribute, the PDF output will show the character as ####
Can I solve this problem?
Or, it is not allowed to enter Chinese character in "codeph" attribute?
Your suggestions helped me!
But, still have one question.
If I have Chinese character in "codeph" attribute, the PDF output will show the character as ####
Can I solve this problem?
Or, it is not allowed to enter Chinese character in "codeph" attribute?
Return to “DITA (Editing and Publishing DITA Content)”
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