Click here to Skip to main content
15,918,808 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
for my asp.net mvc application i have used jspdf but the problem is when i convert a div of entire page is broken and i am not getting the whole html page as pdf

What I have tried:

i have followed this https://jsfiddle.net/xzz7n/1/
Posted
Updated 15-May-16 20:27pm
v2
Comments
Sergey Alexandrovich Kryukov 16-May-16 0:42am    
Why would you like to use client side (JavaScript) for that? You are already using ASP.NET, and with .NET there are more well-known possibilities for PDF generation.
(And why do you think you need PDF, which is quite foreign to the Web? I don't say that you should not do it, just asking.)
—SA
George Jonsson 16-May-16 1:05am    
You got a misplaced reply.
Sergey Alexandrovich Kryukov 16-May-16 2:17am    
No. Please look at the tag "JavaScript" and "ASP.NET" mention in the body of the question.
—SA
Rakib Ahmed 16-May-16 0:52am    
give me good source of asp.net html to pdf link
George Jonsson 16-May-16 1:06am    
Use the reply button if you want to notify the writer of the comment.
The word 'please' would not be in the way either.

I would suggest to use jsPDF , Please refer this link GitHub - MrRio/jsPDF: JavaScript PDF generation for legends. HTML5 FTW.[^]
 
Share this answer
 
Comments
Rakib Ahmed 16-May-16 1:08am    
bro i have used that but my plm is this is not converting whole html page the page is broken when converting to pdf
Sergey Alexandrovich Kryukov 16-May-16 2:18am    
Why did you accept this answer formally then? :-)
—SA
akib Ahmed asked:

give me good source of asp.net html to pdf link
This is not exactly what you need. This problem is related to .NET, but not specific to ASP.NET.

Please see my past answer: How to convert HTML to pdf[^].

Also, this is a set of references to PDF libraries you can use: http://csharp-source.net/open-source/pdf-libraries.

You may need to parse HTML to get the data and format it as PDF, you can use the parser HTML Agility Html Agility Pack — Home[^]:

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900