For converting PDF to text from C#, now you do not need to spend a lot of money to buy software toolkit. VeryPDF develops a series of cloud based API application, VeryPDF PDF to Text Converter Cloud API is one of them. This software is also cloud based application, so you can call this software together with C#, VB.NET, ASP.NET, ASP, PHP, Java, Ruby, Amazon, etc. This software only can be used to convert text based PDF to text. When converting image based PDF to text, please use the version with OCR function. By by this PDF to Text Converter Cloud API, you can convert password protected PDF to text, choose conversion page range and others. Please check more information of this software on homepage, in the following part, let us check how to use this software.
Step 1. Go to the registration page
- Go to the registration page to register an account. Please input a user name and your email address, and the click the Register button. Please pay more attention to the email box as when you pay for it, the API code will be sent to you email box at once.
- When you get the code, for safety reason, you’d better change the temporary password to your preferred new password.
- There are many payment method, please check them in Try and Buy website.
Step 2. Convert PDF to Text from C# by cloud API application.
- Here is a code template of calling this software from C# for converting PDF to text, please have a check.
public partial class Form1 : Form
private void button1_Click(object sender, EventArgs e)
string url ="http://online.verypdf.com/api/apikey=XXXX&app=pdftools&
WebRequest request = HttpWebRequest.Create(url);
WebResponse response = request.GetResponse();
StreamReader reader = new StreamReader(response.GetResponseStream());
string urlText = reader.ReadToEnd();
- Here are some parameter for you to choose:
-f <int> : first page to convert
-l <int> : last page to convert
-opw <string>: owner password (for encrypted files)
-upw <string>: user password (for encrypted files)
-layout : maintain original physical layout in PDF to Text conversion
-nopgbrk : don't insert page breaks between pages in PDF to Text conversion
When adding those parameters to output PDF file, please add them at the end of the URL like the above code template. During the using, if you have any question, please contact us as soon as possible.