Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 216
  • Last Modified:

HowTo read contents of a .pdf/.zip ?

Hello all

any pointers on how to

1. get the text contents of files such as *.html ( or any url ),*.pdf etc and storing them in a db
i've the VBA-word to get the contents of a word file but not decided on how to approach a .pdf and .html file, any pointers here ?

2. programmatically unpacking a .zip file's contents to a folder of choice, and then going to step 1

on another note (you get the points even if the following is not answered ) i need to do (programmatic) searches on the contents of files ( that's why i store the contents into a db and do a sql server full-text search ), but also might need to do regular expression searches -
any leads here ?

TIA

0
dkjnkm
Asked:
dkjnkm
1 Solution
 
Alon HirschSoftware Development ManagerCommented:
Hi,

For HTML and other Text based files - it's very easy. Simply read the file into a string variable and write that variable into a Text field in SQL Server using AppendChunk.

For PDF and other binary file types - you would need to get some sort of control or something that can read those types of files and then do the same type of thing : translate them to text and appendchunk to the database.

To Unzip files in a ZIP you would need some sort of UNZIP control or DLL. InfoZip have a freeware (I think) DLL that has that capability. Go to http://www.infozip.com or http://www.infozip.org and search from there.

HTH,
Alon
0
 
Éric MoreauSenior .Net ConsultantCommented:
To unzip, you may use this free component: http://vbaccelerator.com/codelib/zip/zipvb.htm
0
 
DanRollinsCommented:
Hi dkjnkm,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept AlonHirsch's comment(s) as an answer.

dkjnkm, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 
SpideyModCommented:
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now