Generating Thumbnails for PDF - pdf

i have to generate preview thumbnails for a bunch of user generated pdfs.
Therefor i have a asp.net mvc5 application with imageresizing.net.
Now i have the problem, that the PdfRenderer crashes due a multithreading problem in Ghostscript.
As a next step i have written a custom Handler for *.pdf, which does the scaling and caching manually.
And now the question: how can i disable the mapping for .pdf to the imageresizing.net engine, as i want to handle the scaling and caching by myself?

If you uninstall the PdfRenderer plugin, it will stop catching those file extensions.
You might also consider trying PdfiumRenderer; PDFium is better the Ghostscript for most tasks, and is not GPL-licensed.

Related

How to generate PDF offline with UWP

I'm developing a UWP app for tablet and i need to generate a PDF with data from SQLite. I need to do this completely offline because where I will use the app there is no connection. What could I do?
I'd prefer not to use paid libraries like Syncfusion and XFinium so I'm trying to find an alternative solution.
I tried with iTextSharp but unfortunately I can't find a good documentation to render a complex PDF or to export a Bitmap generated from a Grid Component to a PDF File.
Why not render your data into a webpage displayed with a WebView control? Then you can use any permissive licensed javascript library to generate the PDF.
If it hasn't changed much, then you can only send text back and forth between your WebView and UWP app, but that's workable. Your final PDF result can be read back as a base64 encoded string.
A very quick search found this one that seems easy to use and you can just download the source to put into your app:
https://github.com/MrRio/jsPDF

Creating React Native App with pdf annotation and sign on PDF Function

as I state on the title, I want to develop a project that having ability to open PDF file within the App (React Native), then later we can add annotation, notes, and sign on the PDF (put writing).
The pdf is from the server, so I assume we can call some kind of library that can open pdf and edit and have those features.
I tried browsing about it and found that PSPDFKit can be a solution, but the pricing is pretty much expensive. Is there any other library that can be use for this purpose?

How to make android animation like new Google app, "Playbook for Developers"?

This is the link for the app Playbook for Developers.
these are examples of animations::
I think, this app use AnimatedVectorDrawable.
However it is very difficult to create a complex animation, unless there is any tool that converts vectors as svg2android made ools as Adobe Illustrator into vectors android can identify.
I would be most grateful if you tell me how to make these animations and if there is any tool to make using tools such as Adobe After Effects.
Unzip the apk and you will find out that they are gif files.
And it seems that they are using https://github.com/koral--/android-gif-drawable to load gif files.

Multiple photo upload using struts1

We happened to get requirement to upload the multiple files ( like the gmail attachments ) using struts 1.3.5 and Ajax.
I happened to go thorough lot of resources but no luck.
Can someone shed light on this possibly by suggesting or pointing to some useful resources.
I was also looking for a multiple file upload solution for my struts2 application. Since ajax form submit do not support image submission the only option to use was a hidden iframe strategy. However, i found this wonderful plugin which uploads multiple files withour reloading the page and also shows a cool progress bar. The best thing about this plugin is that it doesn't uses flash and works on IE too. I strongly recommend using this plugin
Donot use taglibrary defined file upload for uploading. You can still use
common- fileupload to handle file upload. By doing this you can dynamically
add one more input type file element below the current input type upload using
javascript. I doubt if there is any way to do this using pure struts 1.3.5 :) .

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.