Controlling size of SVG logo in header
Posted: Wed Aug 22, 2018 4:09 am
The code for my page attribute is below. Basically, it puts a gray bar across the top, with a logo in the top left and document name in the top right, with a page counter on the bottom.
I'm trying to use an SVG for the logo. However, the height attribute does not seem to be applying; the logo comes out huge in the resulting PDF. According to the document page on Graphics: Mixing text and images in the content property disables the width and height specification. Is that what is happening here? I'm not using any text in the @top-left, but I am using a background color. Is that enough to disable the width and height features? If so, how else can I control the width and height of my svg?
@top-left {
content: url('logo.svg') !important;
background-color: #DCDCDC !important;
height: 40px !important;
}
@top-right {
font-family: 'Noto Serif', serif !important;
font-size: smaller !important;
content: string(publication_title) !important;
background-color: #DCDCDC !important;
}
@bottom-right {
font-family: 'Noto Serif', serif !important;
font-size: smaller !important;
content: counter(page) " of " counter(pages) !important;
}
@top-left-corner {
content: "" !important;
background-color: #DCDCDC !important;
}
@top-right-corner {
content: "" !important;
background-color: #DCDCDC !important;
}
I'm trying to use an SVG for the logo. However, the height attribute does not seem to be applying; the logo comes out huge in the resulting PDF. According to the document page on Graphics: Mixing text and images in the content property disables the width and height specification. Is that what is happening here? I'm not using any text in the @top-left, but I am using a background color. Is that enough to disable the width and height features? If so, how else can I control the width and height of my svg?
@top-left {
content: url('logo.svg') !important;
background-color: #DCDCDC !important;
height: 40px !important;
}
@top-right {
font-family: 'Noto Serif', serif !important;
font-size: smaller !important;
content: string(publication_title) !important;
background-color: #DCDCDC !important;
}
@bottom-right {
font-family: 'Noto Serif', serif !important;
font-size: smaller !important;
content: counter(page) " of " counter(pages) !important;
}
@top-left-corner {
content: "" !important;
background-color: #DCDCDC !important;
}
@top-right-corner {
content: "" !important;
background-color: #DCDCDC !important;
}