Converting HTML Files into a PDF - pdf-generation

I have a website that displays product information that the client wishes to offer as pdf format. I need a way to dynamically convert a particular HTML page into a PDF, does anybody know of a way to do this? I need to convert an html page into a PDF document and serve it to the end user on the fly (there are WAY too many products to do this manually and these products receive updates regularly so a manual approach is out of the question)
EDIT: I forgot to mention that I need this to use either vb.net or c#.net

Have you tried iTextSharp?

Related

How to print entities from entity print module?

I am using Drupal 8 and working on Eform types. I had to generate PDF from eform submissions. I used entity print module for this and am using DOMPDF as PDF Engine. I am able to apply custom css to the pdf but the requirements are still not covered. Now I need to override the template so that I can customize the PDF as per my requirement, I could not achieve this. Few requirements:
I need to insert tabular format.
Custom sequence of entities/fields.
Site Logo
Is there any way to do so?
You could also go to he link to get more details on the output before it is sent to the pdf engine.
/print/pdf/node/86/debug

Generating PDF files from Database using CodeIgniter

Generating PDF files from Database using CodeIgniter
for example,
when i click save button all contents in the table can downloaded as pdf format
please help me
thanks...
Take a look at this article.
http://www.christophermonnat.com/2008/08/generating-pdf-files-using-codeigniter/
Also my answer is helful too.
cezPDF in Codeigniter 2
on the user click you should hit a controller function which will query the database and load a view file which you can pass to this library and it will throw it as pdf.
There is no native PDF library in CodeIgniter, so you need to use an third party library or a third party software-as-a-service (SaaS) to generate the PDF.
Here is what I did for one client.
I first generate a nicely formatted, print-friendly HTML page using standard CodeIgniter techniques to select the data from the relevant table, sort it, and echo to the page.
Next, I use the following SasS to turn my formatted HTML page into a PDF download:
http://www.htm2pdf.co.uk
This is a commercial system, but relatively affordable and quick and easy to use.
Alternatively, if you want to do some custom programming, you can try:
http://html2pdf.fr
In this case, you need to link to the class file (external to CodeIgniter) and call
the various methods to generate the PDF. This approach does not require an annual fee
but it will take more programming effort.
You can use codeginter's database utility for getting backup in txt format first http://ellislab.com/codeigniter/user-guide/database/utilities.html#backup
Then you can read the generated file and convert it in pdf using https://github.com/aiwmedia/HTML2PDF-CI
This pdf will you can give for download

Convert emails to HTML or PDF programmatically

I'm trying to convert emails from my mailbox, into either HTML or PDF programatically.
My main motivation is to able to create summary of emails on a web page, and able to expand a particular email and view the entire content of the email.
I figured PDF might be an option since I do not have to worry about linking the contents in the email (eg. image) to the storage location of the image.
I'm starting with the ruby Mail gem and I also came across mhonarc. I'm not sure if mhonarc is a too much for what I'm trying to do, so I decided to ask here to see if there alternatives out there.
Gem pdfkit is used for generating PDFs. Please read readme, gem requires wkhtmltopdf library in your system.
I would approach email conversion via the IMAP library (there might be newer ones out by now) and then serve everything from a simple Sinatra app in the browser. You can use a template language to generate simple html output and logic. Of course you can also use prawn for pdf generation. Many different ways to get there... Not sure why you don't just load emails and show partial content. Life can be so simple.

Safe PDF view in ASP.NET MVC

I have a PDF file and I want to allow users to view it online, but I want to prevent this document from being downloaded. Does know any solution to achieve that ?
This is fundamentally impossible.
The only way to view a PDF is to download it to a temp folder. (the browser does this automatically)
On a deeper level (for any type of document), it is fundamentally impossible for you to tell what is sending an HTTP request.
You could convert those PDFs to an ePaper solution.
This is one option... but there are lots.

Drupal: storing images and other module data

Suppose we have a module that displays tables of employees. Each employee has a photo. What is the best way to store this photos and display them?
I mean, is there some kind of content repository in drupal? I don't want to do this manually, maybe there is an API that can store images and then generate links to them and so on.
Thanks.
The Content Construction Kit(CCK) / Fields in core is what you want to explore.
Using CCK you can attach an image, a number field, a file, some text, a reference to content, etc to another piece of content.
In Drupal 7 you can add fields to any entity (Content, User...your custom one(Employee)), in Drupal 6 you might want to explore Content Profile
Further Reading:
http://drupal.org/node/717120
There is a kind of content repository in Drupal: both in the database and as storage (disk).
The API for that is documented in a special File upload section.
If you want inspiration, the core module called upload.module can serve as example. But be aware that Drupal core, for several reasons, is far from the best and cleanest examples to learn from.
What you are looking for is CCK module with file-field and image-field modules for handling the image upload action.
And for the display of those uploaded images you should use Image-cache

Resources