This is a migrated thread and some comments may be shown as answers.

Validate a Locally Stored PDF File - Instructions in Help-section outdated

1 Answer 93 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
systeembeheer
Top achievements
Rank 1
systeembeheer asked on 06 Aug 2020, 02:49 PM

I am looking into using Test Studio for testing locally stored PDF files. The following page in your documentation ( https://docs.telerik.com/teststudio/advanced-topics/coded-samples/general/open-and-read-pdf-file ) refers to a required third party .dll that is outdated.The iTextSharp library on GIT cannot be parsed in recent Visual Studio versions to produce the .dll. However, their more recent version, iText 7, can be parsed resulting in different .dll's than the one mentioned in your instruction, making it unclear for me which of these .dll's I ought to include in the project root folder and how to add them to my coded step. I don't think the previously shown...

 

using iTextSharp.text.pdf;

using iTextSharp.text.pdf.parser;

using System.IO;

 

... would work anymore, right? Would it therefore be possible to update the help page to show the recent version of this iText tool?

 

Of course I'd also appreciate anyone's help here in the forums as well! Thanks in advance!

1 Answer, 1 is accepted

Sort by
0
Nikolai
Telerik team
answered on 10 Aug 2020, 09:32 AM

Hello,

The "iTextSharp" project was move to git and yes it does now requires a local build but everything else in the article is still the same. 

In order to get and build the 'itextsharp.dll' library just follow these steps:

1. Go to "https://github.com/itext/itextsharp/tree/master", 'master' branch is the critical thing here.

2. You don't need to add it as a git repo, just download it as a zip file. 

3. Extract the zip somewhere on your machine.

4. Open Visual Studio command prompt, in my case I use VS 2017 but 2019 will work as well. (see attachment) 

5. Use the following command in order to build the  'itextsharp(vs2010).csproj":

msbuild "itextsharp(VS2010).csproj" /t:Rebuild /p:Configuration="Debug_woDrawing" /p:Platform="AnyCPU"

6. The output will be single 'itextsharp.dll' which you can use as described in the help article. 

 

Regards,
Nikolai
Progress Telerik

Tags
General Discussions
Asked by
systeembeheer
Top achievements
Rank 1
Answers by
Nikolai
Telerik team
Share this question
or