dfinke / WebScraping

10 stars 2 forks source link

First test run on my machine, I got the following errors #2

Open mfkhan237 opened 8 years ago

mfkhan237 commented 8 years ago

Command I used to run:

Get-PDFContent https://www.fas.org/sgp/crs/row/R42694.pdf

PSVersion: 3.0

Add-Type : Cannot bind parameter 'Path' to the target. Exception setting "Path": "Cannot find path 'C:\powershell\dev\itextsharp.dll' because it does not exist." At C:\powershell\dev\Get-PDFContent.ps1:12 char:20

New-Object : Cannot find type [iTextSharp.text.pdf.PdfReader]: make sure the assembly containing this type is loaded. At C:\powershell\dev\Get-PDFContent.ps1:20 char:15

New-Object : Cannot find type [iTextSharp.text.pdf.parser.SimpleTextExtractionStrategy]: make sure the assembly containing this type is loaded. At C:\powershell\dev\Get-PDFContent.ps1:22 char:17

You cannot call a method on a null-valued expression. At C:\powershell\dev\Get-PDFContent.ps1:28 char:5

wendefeuer commented 8 years ago

Hello, I thing this will solve your Problem. https://blogs.technet.microsoft.com/heyscriptingguy/2011/04/02/scripting-wife-learns-about-unblocking-files-in-powershell/

dfinke commented 8 years ago

Also, @mfkhan237, did you download the dll along with the script? Both are needed for the solution to work.

mfkhan237 commented 8 years ago

@wendefeuer Thank you for the link, I will be taking a look when I have a chance.

@dfinke No I didn't, that must be it. Thanks!