Generate PDF from selector in current page with CSS

1

I would like to know how to generate a PDF from a selector that I define and that all the formatting of this selector comes correctly in the PDF?

I want to make client-server. Example: Imagine that I have a full page, hence I have a specific area that has a graphic, I want to generate a PDF, but the content of the PDF will be just the one of the graphic. You can take as an example the printElement that printed an element. What I want is this:

$( '#minhaDiv' ).gerarPDF();

It also serves as a file, it does not have to be exactly what I have on the current page, but as long as CSS is not omitted at generation time.

    
asked by anonymous 02.08.2014 / 04:50

1 answer

1

I think you are talking about CSS markups / properties, if you want to recognize CSS properties, I recommend mPDF , but you should use markup up to CSS 2.1 and this is a PHP library, generate the PDF on the server side.

Resources:

  • Accepts UTF-8
  • CSS support
  • Relate the item
  • Supports JPEG, GIF, PNG, WMF and SVG images
  • Watermark
  • Standalone PHP Library
  • Etc ...

See all features at link

Download: link

    
05.08.2014 / 23:36