Link to home
Start Free TrialLog in
Avatar of jdonaghe
jdonagheFlag for United States of America

asked on

Export PDF file from Text field in Database

I am trying to make an export program that will read the text field from a sql server 2000 database and restore the PDF data as a file on the hard drive.  I searched EE and the net and could not find examples of how to do this.  Please help.

Thanks,
     Jonathan Donaghe
Avatar of jdonaghe
jdonaghe
Flag of United States of America image

ASKER

The field in the database is not a varchar field, it is a "text" type.
what component/product you use to export to pdf?
Avatar of Nasir Razzaq
There are a few options.

1) Use a product such as the bundled Crystal Reports to design the output, then you can export the report to PDF programmatically.
Example
http://vb.net-informations.com/crystal-report/vb.net_crystal_report_export_pdf.htm

2) Use the iText open source library
http://www.ujihara.jp/iTextdotNET/en/

3) Use a third party commercial library
Example
http://www.syncfusion.com/products/reporting-edition/pdf?_kk=.net%20pdf&_kt=7af4674d-73fe-4a95-9fe0-9632ce9e1602&gclid=CKbt4ZD5zp8CFRhp4wodP3rtKg
Right now I don't use a product to export to pdf.  If is a commercial product that saves a scanned image into the field.  They also save the mime type in another field because the product will save other file types into the text field.
How about the other approaches?
ASKER CERTIFIED SOLUTION
Avatar of jdonaghe
jdonaghe
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The question was really misleading in that you said the DB field is "TEXT" and you failed to describe that its the bytes of the PDF file which are actually stored in the DB.
I'm sorry you were confused, but I didn't know the format it was stored in.  I was looking for ways to export either binary, text, etc.  I was trying to see if anyone else ran into this specific problem before.