Add image (company logo) in header section, while creating custom.css
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 1
- Joined: Tue Nov 28, 2017 8:30 pm
Add image (company logo) in header section, while creating custom.css
Hi
I am trying creating a custom.css file for custom pdf output. I need my company logo to be on the header. Have written:
But the image is not coming on the generated pdf.
The image is placed in the "C:\Program Files\Oxygen XML Editor 19\frameworks\dita\DITA-OT2.x\plugins\com.oxygenxml.pdf.css\css\img" folder.
Please suggest the resolution to my issue.
I am trying creating a custom.css file for custom pdf output. I need my company logo to be on the header. Have written:
Code: Select all
@page :right {
@top-left {
content: string(maptitle) string(chaptertitle);
font-size:8pt;
}
@top-right {
content:url("logo-5.png");
width: 300px;
height: 100px;
image-resolution: 300dpi;
}
The image is placed in the "C:\Program Files\Oxygen XML Editor 19\frameworks\dita\DITA-OT2.x\plugins\com.oxygenxml.pdf.css\css\img" folder.
Please suggest the resolution to my issue.
-
- Posts: 404
- Joined: Thu Aug 21, 2003 11:36 am
- Location: Craiova
- Contact:
Re: Add image (company logo) in header section, while creating custom.css
Post by radu_pisoi »
Hi,
The image should be stored relative to your custom CSS. In you case, it should be in the same folder with your custom CSS.
Please note it is not recommended to modify the files from the installation folder because this will make difficult to upgrade to a newer oXygen version (to migrate your customizations).
The image should be stored relative to your custom CSS. In you case, it should be in the same folder with your custom CSS.
Please note it is not recommended to modify the files from the installation folder because this will make difficult to upgrade to a newer oXygen version (to migrate your customizations).
Radu Pisoi
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
-
- Posts: 2
- Joined: Wed Feb 12, 2020 8:55 am
Re: Add image (company logo) in header section, while creating custom.css
Post by satyamkatiyar »
Hi
I am trying to align my company logo to the top (without giving any margin) creating a custom.css file for custom pdf output.
Using the below code:
But still, I can see some minor margin between the top and the logo. Please help.
I am trying to align my company logo to the top (without giving any margin) creating a custom.css file for custom pdf output.
Using the below code:
Code: Select all
@top-right {
content: url("logo.png");
width: 49.634px;
height: 49.449px;
image-resolution: 480dpi;
padding-top: 0in;
}
-
- Posts: 662
- Joined: Wed Oct 16, 2019 3:47 pm
Re: Add image (company logo) in header section, while creating custom.css
Post by julien_lacour »
Hello,
Could you indicate which default size is logo.png? It is available in its properties.
You can also check in the documentation how to set a background image.
We will try to reproduce it on our side.
Regards,
Julien
Could you indicate which default size is logo.png? It is available in its properties.
You can also check in the documentation how to set a background image.
We will try to reproduce it on our side.
Regards,
Julien
-
- Posts: 2
- Joined: Wed Feb 12, 2020 8:55 am
Re: Add image (company logo) in header section, while creating custom.css
Post by satyamkatiyar »

image.png
You do not have the required permissions to view the files attached to this post.
-
- Posts: 501
- Joined: Mon Feb 03, 2003 10:56 am
Re: Add image (company logo) in header section, while creating custom.css
I see from the image properties screenshot that the image is a perfect square, while in the CSS you are using slightly different values for the width and for the height.
To get perfect alignment of graphical elements in the page, we recommend using a single background image for the entire page, as in the link posted by Julien, instead of separate images assembled using page margin box selectors, like top-left, top-right, etc..
Many regards,
Dan
To get perfect alignment of graphical elements in the page, we recommend using a single background image for the entire page, as in the link posted by Julien, instead of separate images assembled using page margin box selectors, like top-left, top-right, etc..
Many regards,
Dan
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