How can I use Hammer for Mac to build out markdown files - haml

If I have, say, 50 markdown files, I don't want to create a HAML template for each of one them. Is there a way to have Hammer for Mac use the markdown pages and a single HAML template to build out HTML pages for each?

Related

Show pdf in JavaFX application

I read the following posts: JavaFX: Display PDF in WebView, Displaying pdf in JavaFX
But there occur some problems for me:
The links of JPedalFX do not work any more and I can't find example codes on the web.
I don't want to use Swing-components in an JavaFX-application.
The solution with PDF JS doesn't work either, because Maven is used in the project and I don't want to put the library in the resources folder.
JxBrowser would be a possible solution but cost too much.
Any ideas?

Sphinx documentation: Include svg images in PDFs via latex

I'm doing an internship for an IT company which needs a document application for its firmware docs (md files).
The request was to maintain these md files and to convert them to rst format (I used pandoc). So now I have a configured Sphinx application with only rst files. The problem now is that some rst have links to SVG images, and I have to use the latex builder of Sphinx to convert them to PDFs.
I've searched around and I found this solution from 2 years ago, which was essentially what I was looking for: https://sites.google.com/site/nickfolse/home/sphinx-latexpdf-output-with-svg-images. I tried to implement it but I'm not an expert with GNU makefiles and I don't know if the current version of Sphinx allows it or if it is out there an easy workaround, so the thing didn't succeed.
Does someone have a viable solution for this?
At this time, SVG is still not supported. I work around it in Pyramid docs by exporting the original file (OmniGraffle) to both SVG and PNG.
In docs/narr/router.rst:
.. image:: ../_static/pyramid_request_processing.*
And we place images in docs/_static.
The HTML uses SVG and the PDF uses PNG.
There is available the Sphinx SVG to PDF converter extension to automatically convert from SVG to PDF.

How to save a template as PDF in symfony

I am using Symfony1.4 with doctrine. I want to save a invoice template to PDF. How can i do this.
I use for this sfTCPDFPlugin
For converting HTML to PDF, I get the best results with Wkhtmltopdf. Because it uses the Webkit rendering engine (the same used in Chrome and Safari for example), the results are exactly the way you can see the HTML rendered in those browsers.
It is in fact just a binary you can run from the command-line, but an example PHP wrapper class is available from the website. I also did not find it very hard to write a wrapper class myself with some added functionality.

Do any frameworks or libraries exist for the creation of ePubs in iOS apps?

I would like to take in various file formats, such as HTML or XML documents, process them, and output an ePub document from within my iOS application.
Are there any libraries or example applications that can create properly formatted ePub documents on iOS?
You can had a look on sigil which is on C/C++ language. You can export xcode project
from this source code. You can find a manual on their source code. I am also working on Epub publishing. I did not found any suitable library on objective c that export on epub format. So I am doing it manually. If you want to do it manually, this doc will help you to understand the structure of an Epub file.

Jekyll documentation to PDF with TOC

I would like to write documentation using Jekyll with HTML and PDF outputs. Html can have a navigation but the PDF should have table of contents. Is there a free and easy way to do that?
The HTML part is easy but I would like to use #media print CSS for making the PDF file.
I have a few ideas how to do this.
Use PrinceXML, unfortunately this is commercial product with a nasty price tag ~$500
Use WKHTMLTOPDF
Use Maruku, since it is possible to do a PDF conversion using it
I would like to have multiple pages HTML and single page PDF with a TOC. Any suggestions?
Btw. Buildr has solved this problem using PrinceXML.
If 'free' is your most important criterion, than wkhtmltopdf is your best bet. It supports things like covers, toc, headers, footers and sections. Depending on how exotic the layout of your document will be, you most likely will run into some page-break issues, but with a bit of tinkering you should be fine.
I've been using wkhtmltopdf for a bit now, with some quite complicated documents (with javascript charts, tables, svg images, etc.) and have not run into too many issues.
Make sure you use the static version of wkhtmltopdf, as it is the only version which supports rendering of a TOC page.
You can use the PDFKit gem, which uses wkhtmltopdf behind the scenes. Then you can put your PDF logic in a Jekyll plugin as a generator or converter.
For generating a table of contents using Jekyll, you can use the {:toc} macro offered by markdown, or write your own textile table of contents filter if you prefer to use textile..
For generating a PDF from Html and CSS, I have found weasyprint to be a good solution. Since they do not rely upon an external engine for rendering, they do not depend upon foreign project's roadmaps for implementing relevant features such as CSS generated content or #page CSS-declarations. (But in contrast to wkhtmltopdf, weasyprint does not parse javascript).
You could also use a browser extension called Awesome Screenshot to create JPEG/PDF from a page. The extension allows you to create a full-page image or export it to PDF. With this tool, you can export all pages really quickly (and/or later combine all PDFs together to create a single document).
I am aware this is a quick & dirty solution (not perfect). E.g: while using images instead of text, the full-text search will not work. Additionally, it may require some manual work, but it does the job when you just want to read it.