-
Notifications
You must be signed in to change notification settings - Fork 500
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SVG images in header or footer don't respect pdfwidth attributes #625
Comments
You're right. The svg method doesn't support the fit option (like for
raster images). As a result, the specified width is being ignored and the
SVG renders in the intrinsic size. I'll need to fix the options so the
width is honored.
|
mojavelinux
added a commit
to mojavelinux/asciidoctor-pdf
that referenced
this issue
Oct 15, 2016
…g content - honor pdfwidth attribute for image in running content - position SVG correctly - only fit image to bounds if fit=contain or fit=scale-down attribute is used - calculate image width from percentage value based on column width, not content width
mojavelinux
added a commit
to mojavelinux/asciidoctor-pdf
that referenced
this issue
Oct 15, 2016
…g content - honor pdfwidth attribute for image in running content - position SVG correctly - only fit image to bounds if fit=contain or fit=scale-down attribute is used - calculate image width from percentage value based on column width, not content width
mojavelinux
added a commit
to mojavelinux/asciidoctor-pdf
that referenced
this issue
Oct 16, 2016
…g content - honor pdfwidth attribute for image in running content - position SVG correctly - only fit image to bounds if fit=contain or fit=scale-down attribute is used - calculate image width from percentage value based on column width, not content width
mojavelinux
added a commit
to mojavelinux/asciidoctor-pdf
that referenced
this issue
Oct 16, 2016
…g content - honor pdfwidth attribute for image in running content - position SVG correctly - only fit image to bounds if fit=contain or fit=scale-down attribute is used - calculate image width from percentage value based on column width, not content width
mojavelinux
added a commit
to mojavelinux/asciidoctor-pdf
that referenced
this issue
Oct 16, 2016
…g content - honor pdfwidth attribute for image in running content - position SVG correctly - only fit image to bounds if fit=contain or fit=scale-down attribute is used - calculate image width from percentage value based on column width, not content width
mojavelinux
added a commit
to mojavelinux/asciidoctor-pdf
that referenced
this issue
Oct 16, 2016
…g content - honor pdfwidth attribute for image in running content - position SVG correctly, including vertical alignment - only fit image to bounds if fit=contain or fit=scale-down attribute is used - calculate image width from percentage value based on column width, not content width
mojavelinux
added a commit
to mojavelinux/asciidoctor-pdf
that referenced
this issue
Oct 16, 2016
…g content - honor pdfwidth attribute for image in running content - position SVG correctly, including vertical alignment - only fit image to bounds if fit=contain or fit=scale-down attribute is used - calculate image width from percentage value based on column width, not content width
mojavelinux
added a commit
that referenced
this issue
Oct 29, 2016
resolves #625 honor pdfwidth attribute for image in running content
fapdash
pushed a commit
to vogellacompany/asciidoctor-pdf
that referenced
this issue
Dec 13, 2016
…g content - honor pdfwidth attribute for image in running content - position SVG correctly, including vertical alignment - only fit image to bounds if fit=contain or fit=scale-down attribute is used - calculate image width from percentage value based on column width, not content width
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm trying to put a logo in the header, which I have as a nice clean SVG. It works just fine with the pdfwidth attribute on the title page;
logo_image: image:a-plus-logo.svg[pdfwidth=25%]
gives me the expected output.However, any sizing directives I try to give it for the one in the header or footer just get ignored. The screenshot attached here is with
content: image:a-plus-logo.svg[pdfwidth=10%]
, but I've also tried thescaledwidth
andwidth
attributes, and with different units specified (px and in). No matter what I do, the image stays the same size. I do have a workaround at the moment: I just use separate SVG files for different sizes. But that's not ideal, especially since it's a trial-and-error process to get the sizes right.The pdfwidth attribute works as expected in the header/footer when the image is a PNG, but I'd much rather use a vector format in this case.
The text was updated successfully, but these errors were encountered: