Allow images in header and footer
Hi, I really like your application. It allows me to create some nice PDFs in markdown. Sadly our company policy requires a logo in the right side of the header, which is currently not possible in Marked (if it is possible, just tell me how, please)
So, I like to promote to add an extra variable, which allows to render a base64 encoded image. Something like:
%image_xxxxxxx==
Can you please add that? I think this would allow a lot of people to use Marked at work!
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Brett on 14 Mar, 2022 08:13 PM
Unfortunately the header/footer system can not currently support images, and doing so would be a major undertaking (a serious rewrite of existing code). It's probably not going to happen, but I'll add this to my to-consider list for the next round of development.
Thanks,
Brett
2 Posted by Steinthal on 14 Mar, 2022 09:14 PM
You could use an Automator quick action to add your logo as watermark. Check this article with a step-by-step instruction how to create thee quick action.
You probably need to adjust the x and y offset mentioned in that article depending on the size of your logo and the position you want it to appear.
3 Posted by skrug on 15 Mar, 2022 08:20 AM
Thank you for the quick feedback! It’s sad, that it is not an easy implementation. But maybe I have a different solution for this:
How about adding a custom option to the export drawer? Like pdf, odt etc. and it just an extra executable file selection in the preferences.
If someone executes it, the executable gets triggered with the full webpage as string argument and maybe some extra arguments you would consider useful. As a bonus you could even trigger the file selection before and provide the output destination too.
Then everyone can create his own custom processor to generate the output he needs.
If you implement that, I could create a custom script with (probably) wkhtmltopdf or another utility for converting html to pdf and publish it for other users as a starting point.
What do you think about that solution?
@Steinthal Thank you for the workaround. I will try to test it today
4 Posted by skrug on 15 Mar, 2022 08:19 PM
Thank you for the quick response! It’s sad, that it is not an easy change. Maybe another approach to the topic:
What about a new custom entry in the export drawer, which can be configured via the preferences? Just a file selection for an executable would be enough.
If a user executes it, you just give the rendered web page to the executable as argument and maybe some extra variables you consider useful. Then it is the duty of the script to do the job.
This should be easy to implement and would allow others to build their own exports. I could create my own script for the conversion to CI compatible PDF and I would also contribute it as example for others.
What do you think about this other idea?
@Steinthal: that’s great. I tested it and it worked quite good. Not as great as a deep integration, but it’s an improvement to my current workflow. Thank you!
Support Staff 5 Posted by Brett on 30 May, 2022 04:29 PM
@skrug sorry your response got spammed and I only just discovered it.
I’ve considered allowing custom export scripts, but it is a VERY small number of users who have both the capability to write and debug their own scripts and also just wouldn’t want to automate the process entirely, leaving Marked out of the mix. Most of my support time ahead goes toward helping people debug Custom Processors that really have nothing to do with Marked, so adding another vector for trouble gives me pause.
-Brett
________________________________