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 PDF?
I want to make client-server. Example: Imagine that I have a full page, so I have a specific area that has a graphic, I want to generate a PDF, but the content of the PDF will only be the graphic. You can take as an example the printElement
that I printed an element. What I want would be like this:
$( '#minhaDiv' ).gerarPDF();
It also serves as a file, it doesn’t have to be exactly what I have on the current page, but as long as CSS is not omitted at the time of generation.
Can you explain better what you mean by
gerar um PDF a partir de um seletor
? And want to do client or server side?– Sergio
I want to make client-server. Example: Imagine that I have a full page, so I have a specific area that has a graphic, I want to generate a PDF, but the content of the PDF will only be the graphic. You can take as an example the
printElement
that I printed an element. What I want would be like this:$( '#minhaDiv' ).gerarPDF();
– Duque
I found this topic in SO-en: Export Html page to PDF on user click using javascript
– Jader A. Wagner
I tested the solution of the link above and could not fix my problem. The code simply does not run.
– Duque