Grails save pdf of rendered page - pdf

Is it possible to render view with all css, js... and
then save all generated html page in pdf?
I've tried solution with python libs:
grails run-app localhost:3030
dfkit/weasyprint visit page localhost:3030
pdfkit/weasyprint save html as pdf
But weasyprint have problems with my local css and pdfkit fails too.
So I'd like to know wheter it is possible to render pdf for generated html from grails and what libs should I use?

Related

Using bootstrap template in TinyMce

I have html page, created in bootstrap 3 (page.html).
After copy html code in TinyMce editor (Source code option), I can see all page content but without css/js settings (colums,tabs,accorditions,etc..).
Now, is there some solution to see all bootstrap features in TinyMce editor?
Tnx

How to Export Swagger documentation in PDF and XML files

I have generated swagger document for web api using below link:
http://wmpratt.com/swagger-and-asp-net-web-api-part-1/
Need to export document in PDF or XML file to send across handy.
Its .NET WEB API.
How to export swagger documentation ?
Thanks
Here's what I did today, since many of these other projects require laborious workarounds or extra libraries or some completely separate language.
Go to https://editor.swagger.io/ (Make sure it's the HTTPS version)
At the top, click File => Import File.
Select your Swagger JSON file.
At the top, click Generate Client => HTML2 and download the ZIP file.
This yields a static HTML page that you can then print (via the browser) to PDF using the built-in Microsoft Print to PDF printer, or Adobe Acrobat, or whatever else you might want to use.
You can use Swagger2Markup and AsciiDoc docker images:
docker run --rm -v $(pwd):/opt swagger2markup/swagger2markup convert -i "https://api.example.org/api/doc/swagger.json" -f /opt/swagger-doc
Creates asciidoc file named 'swagger-doc.adoc' in current folder.
docker run -it -v $(pwd):/documents/ asciidoctor/docker-asciidoctor asciidoctor-pdf swagger-doc.adoc
Creates a PDF file named 'swagger-doc.pdf' in current folder.
The Swagger2Markup project is on GitHub and some more information you'll find by using Google too.
Swagger2Markup converts a Swagger JSON or YAML file into several AsciiDoc or GitHub Flavored Markdown documents which can be combined with hand-written documentation.
AsciiDoc is preferable to Markdown as it has more features. AsciiDoc is a text document format for writing documentation, articles, books, ebooks, slideshows, web pages and blogs. AsciiDoc files can be converted to HTML, PDF and EPUB. AsciiDoc is much better suited for describing public APIs than JavaDoc or Annotations.
You can generate your HTML5, PDF and EPUB documentation via asciidoctorj or even better via the asciidoctor-gradle-plugin or asciidoctor-maven-plugin.
The project requires at least JDK 8.
See also RESTful API Documentation with Swagger and AsciiDoc
Their is no such tool or functionality to export swagger documentation into PDF or any other doc. You need to convert your swagger.json file to yaml file then u can get swagger as html doc form http://editor.swagger.io/.

Load PDF in Vaadin from Resource

I designed a Document Viewer in Vaadin that displays PDF files to the user. I successfully added the PDF to the viewer by specifying the system path. The problem is when I run the Viewer in a remote system, the PDF isn't displayed. So is there any way to load the PDF using the resource like we load the images.
Here is my code:
File pdfFile = new java.io.File ("D:/WorkFiles/PDF Books/newsletter.pdf");
The pdf is loading only from the local system. I have tried adding the pdf in the themes folder, but it doesn't work.
Thanks in advance.
What about the https://vaadin.com/api/com/vaadin/server/StreamResource.html. You can use this for on demand generated PDF files.

intellij generate JDocs html files

I'm writing an website with intelliJ and my JS files have JSDocs annotations as supported by IntlliJ.
I there a way to produce JSDocs html files like with javadocs?

PhoneGap Plugin ExternalScreen loading external assets

I am using the "ExternalScreen" plugin for phonegap, and I am loading a 'local' html file. This 'local' file won't load any of my 'external' assets. In other words, the HTML file links to JavaScript libraries and CSS Stylesheets, but it is not loading them. Even if I do inline styles, it won't load images.
Any idea why no assets are being loaded outside of the .html page with PhoneGap ExternalScreen?
Thanks!
This was a bug in the "localHTMLResource" function of the plugin, and it has been fixed.
Thanks #andytrice