Scroll PDF Exporter 4 - Modify export css
Hi,
I read that html/css skills are not needed for templating anymore. On the other hand to have the ability to use custom css powerful and I miss this.
Can I download my own template and somehow change the css there to upload and use it again?
I'd also like to apply some javascript before my pages are rendered as PDF, is this possible?
Many thanks for your great work!
Kind Regards,
C.M.
-
Hi C.M.
Thanks for your interest in Scroll PDF Exporter. It's not possible to edit CSS/HTML code in templates created in version 4.0 and above. We will continue to support legacy templates created in 3.5.0 (where you can edit CSS and HTML) until end of 2017. Javascript was not possible to be applied to templates before.
Is there a particular reason why you need CSS editing capabilities? Is there a certain setting in a template you can't achieve with Template Designer?
Cheers,
Roman. -
Hi Roman,
Thank you for your quick reply.
I want to have line numbering for ordinary paragraphs, so I'd at least need to use the CSS counter-increment and in my case I also want to use javascript as it helps me to apply it without modifying the DOM too much before.
With version 3.5 I can add resources (like my javascript) and modify the CSS so currently I try to create my template with the old version and import it into v4 - hopefully it will work.
Do you think I can also achieve this in the new version by building a user macro?
Kind Regards,
C.M.
-
What you can do in v4:
Download Template, rename .data to .zip, open e.g. data/design.json
This is a json which contains the template in html. You can add <style> YOUR CSS </style> into this html. Remember it is a Javascript string and not plain-css, so replace " by \" and multi lines do not work easily.
Update the json-file in the .zip file, rename .zip to .data, upload the template.
@Roman: We needed to have heading numbers for h4 and h5 and not stop them at h3 as is the case with the default css template. Additionally, we wantet h4 and h5 to appear in the Bookmarks of the PDF.
-
Hi Celine,
It's not supported to have numbering for paragraphs in the recent release of Scroll PDF Exporter. Could you please share your use-case for it? Why do you need this feature? Do you have any examples of PDFs exported with legacy templates to see how it looked like.
Cheers,
Roman. -
Hi Mathias,
The possibility of editing CSS you suggested is definitely not supported by us. We strongly recommend not to do this.
The feature request to add numbering to headings 4-6 is tracked in this JIRA issue: https://k15t.jira.com/browse/EXP-2079. An option to configure bookmarks is a feature request tracked here: https://k15t.jira.com/browse/EXP-445. Sign up for an account in our JIRA to watch and vote for this issue.
Cheers,
Roman. -
Hi!
I need to edit CSS because we're using confluence in Persian languane which as you may know is a RTL language. When Exporting content to PDF I need to see them RTL. I probed the templates but the only thing I could find was alignment which does not meet my needs.
Is there any way to export RTL content?
-
Hi Maryam,
Thanks for asking.
In general our PDF library does support RTL content, so we could improve this, however as far as I know Confluence does not support it out of the box.How have you implemented the RTL content in Confluence? Are you currently using the workaround with the user macro as mentioned here?
Best,
Nils -
Why you do not want to support CSS anymore? It gives much more control over what can be done with exported pdf document. Lots of the options may not be supported by you for a long time until they are finally implemented. Giving the freedom of writing your own css (even with indication "at your own risk") would help people to generate desired output.
-
Hi Tomas,
We introduced the new graphical template designer because we collected lots of feedback from our users who had problems using the old template editor, as they found it was extremely difficult to create templates without CSS and HTML knowledge. With the new template designer, we focused on improving the user experience and aimed to allow everyone in the company – including those with no coding skills – to create PDF templates.
However, I can understand your point in relation to having more control over the list styling, beyond the ordered lists which Confluence provides. Are you able to provide some export examples for what you require? Is so, I can then check to see if this is something we can look to improve within our version 4 template editor.
Deprecated templates (from version 3.5) are not editable in the version 4, but can still be used to export pages.Cheers,
Roman. -
Hi Roman,
Thanks for your answer. I understand this approach, although for people with HTML/CSS knowledge such approach is seen as limitation. How can I inform you about my requirements? In our company I would like to move from MS Word - documentation generation to Confluence based. In order to go this path I need to have possibility to style the PDF output in a way it is currently styled in my company.
For that I need:
- style bullet list markers separately from the text (specifically I would need blue square bullets slightly bigger that the one you are using but have black text),
- to have more control over table borders and creation of several border styles - I need to have two styles: one with outer table border (just the outer one) present and one with border removed,
- table to have alternative background color https://www.w3.org/Style/Examples/007/evenodd.en.html
- table with border only between first and second column,
- more than 3 columns in page sections - specifically I need to have 4 columns in the footer of the document.
I could probably hack it somehow to meet my needs but I am afraid that my hacks could be broken after plugin upgrade.
-
Hi Tomasz,
Thanks for your feedback.
To respond to your feedback, at the moment we have some open Jira issues that relate:
- https://k15t.jira.com/browse/EXP-2487 - We have an open improvement for introducing the option to style list level styles. Was I right in thinking that you would want to the style the list element (eg. bullet icon / number)?
- https://k15t.jira.com/browse/EXP-2537- At the moment, we have an open improvement for introducing the ability to apply different styles to tables, similar to what already exists for Scroll Word Exporter. Would this fit your needs if introduced?
At the moment, there are no concrete plans to introduce further options for table backgrounds (banding), new column layouts or different border options. Was not having these options preventing you from being able to export the content with our app?
Thanks for the feedback also. If you are satisfied with Scroll PDF Exporter (and have a couple minutes to spare), it would be great if you could leave a rating or even a short customer review in the Atlassian Marketplace: https://marketplace.atlassian.com/plugins/com.k15t.scroll.scroll-pdf/server/reviews
Cheers, Thomas (K15t)
-
Hi Thomas
regarding tickets:
- https://k15t.jira.com/browse/EXP-2487 - We have an open improvement for introducing the option to style list level styles. Was I right in thinking that you would want to the style the list element (eg. bullet icon / number)?
Yes. I want to style the list element. I want to be able to color for example the color of the bullet separately from the color of the text.
- https://k15t.jira.com/browse/EXP-2537- At the moment, we have an open improvement for introducing the ability to apply different styles to tables, similar to what already exists for Scroll Word Exporter. Would this fit your needs if introduced?
Probably. I did not check the word plugin in detail. It may happen that it will allow me for more styling options than what PDF export can. If yes then this could be a workaround.
-
Hi,
I am also missing a css style option. You could add it as an expert mode...
Concrete we are evaluation scroll pdf converter for generating our documentation. In the online editor I could not find a way to style images? I would like to add rounded corners. As far as I can see this is not possible?
Even more we want to style Info boxes like this:
Moving the icon and Headline half out of the box is also not possible as far as I can see.
Are there any tricks to achieve something like this anyway? Or can I tell the pdf converter not to override the Confluence style?
Thank you for your answers,
Jakob
-
Hi Jakob, thanks for your comment.
In regards to the info box styling that you require, this is not possible in v4.x as we don't have the functionality to move the admonition icon around independently. To achieve something like this in your export you would likely need to implement your own user macro or custom CSS that formats this. For instance, creating a user macro that outputs a <style> tag with the CSS for the info macro that styles it like what you require. You could then include the user macro in one of the export pages.
In relation to the image question, we currently don't offer any global export settings for image formatting within custom templates. However, this is something that has been requested previously and we have an open feature request for this functionality here: https://k15t.jira.com/browse/EXP-2304
I am unable to provide a time-frame in regards to when this may be focused on. However, please sign up to our JIRA (via https://k15t.jira.com/) in order to watch and comment on this issue. We'll then send a notification for every status update.
Thanks, Thomas (K15t)
-
Hi Thomas,
Thank you for your reply. The idea with the custom marco looks like an acceptable solution to me. Is there a way to make the custom macro style different on even and odd pages? Could you give me an class name or a attribute that differs between even and odd pages in one of the surrounding containers?
I need this as the macro shall start at the real page boarder and so must have a negative margin to compensate the margin defined for the page. my even and odd pages have however different margins, left and right.
Thanks, Jakob
-
Another question: In my style I want to use a custom font. In your GUI I found a way to upload fonts and use them in the templates. But in the macro css I can't use them. In the exported pdf I found out, the the converter seems to prepend some random characters to the font name. For example "RDCHUS+Amatic SC". Do you know a way to use the font anyway?
-
Hi Jakob,
I consulted with our developers and to answer your posts in order:
For your first question, unfortunately it’s not possible to style elements on even/odd pages differently. This is because the CSS paged media spec only allows to style certain values like margins, paddings and borders of the page itself (via @page :left or @page :right) but not the content inside of this page. You can see this related documentation for further information: https://developer.mozilla.org/en-US/docs/Web/CSS/:right
For the second question (relating to custom fonts), the exporter generates @font-face CSS entries for all fonts by just prefixing the font with “Scroll Template Font “. For example, when using the Meiryo font, it will be available as “Scroll Template Font Meiryo” in CSS. The font name that is used with this prefix is taken from the font file directly and should be the same as what is displayed in the template-editor UI when uploading the font.
Hope this information helps,
Cheers, Thomas (K15t)
Please sign in to leave a comment.
Comments
20 comments