Convert HTML to PDF Stream into DB
-
Hi I would really appreciate it if anybody can help me!! I must convert a HTML page ..images include into a PDF file and stream the PDF file into a DB. I have searched the net without any real success. Thanks Regardt Africa is a though country --"Hello daar vir die Afrikaans sprekende"--
-
Hi I would really appreciate it if anybody can help me!! I must convert a HTML page ..images include into a PDF file and stream the PDF file into a DB. I have searched the net without any real success. Thanks Regardt Africa is a though country --"Hello daar vir die Afrikaans sprekende"--
You have to split this up into two part. First convert then encode and send to server. Take a look at this site: http://www.verypdf.com/ and see PDFcamp/PDFwriter - it looks like this is the least expensive way of converting html to pdf. If you are looking for more pro components then around at: www.pdfstore.com (Some of the prices out there are scare if you are a startup and dont have much money.) To put the pdf in database just read the file in and use Convert.ToBase64String() and send it to the database.
-
You have to split this up into two part. First convert then encode and send to server. Take a look at this site: http://www.verypdf.com/ and see PDFcamp/PDFwriter - it looks like this is the least expensive way of converting html to pdf. If you are looking for more pro components then around at: www.pdfstore.com (Some of the prices out there are scare if you are a startup and dont have much money.) To put the pdf in database just read the file in and use Convert.ToBase64String() and send it to the database.
You could also - depending on the RDBMS - store the PDF as a binary stream, which some ADO.NET classes (like those in
System.Data.SqlClient
) support. IMO, you should store the PDF on the filesystem and either store the path in the DB or use the primary key as part of the filename, which is what we do in our flagship product.-----BEGIN GEEK CODE BLOCK----- Version: 3.21 GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++ -----END GEEK CODE BLOCK-----