C# Tutorial 52: Converting PDF to Text in C#
Extract Text from PDF in C#
c# - How to convert PDF to text file in iTextSharp
Reading PDF content with itextsharp dll in VB.NET or C#
how to convert pdf file to text file using c#.net
c# - Itextsharp text extraction
C# PDF to Text Converter Console Application
c# code to extract data from pdf file Searches related to itextsharp Pdf to text C#
itextsharp read pdf text
itextsharp add text to pdf
itextsharp text pdf pdfwriter
c# itextsharp merge pdf
c# itextsharp create pdf
Closed Caption:
hello guys welcome once again in the
last video i will show knew how to read
your PDF file and convert it into the
string and show it into the text box or
rich text box so i will show you what I
have done in the last video i click this
read PDF button and I can choose any PDF
file from it so I to this file for
example and it reads all the PDF file
and it pass the content of PDF file and
show it into my pledge text box in this
video I will show you how to convert
your PDF file into the text file using
your itextsharp dl so for this I would
need the code for which I have used in
the last video so if you don't know how
i have written the court for the reading
the PDF then go to the last video and
just see how i have written the code for
reading wikipedia and i will just
include some more lines in that code and
i will use most of the Court which I've
written in the last video so in the last
video if you remember I created this
text box and this read PDF button and
when i click this button i have written
this code in the last video
ok so
and that we do i was able to convert my
PDF file into the string and now i want
to convert that string into the text
file so indirectly I'm converting my PDF
file to the text file right so first of
all we will write the code for writing
that string into the PDO into the text
file so go at the top for that we need
the this using namespace so right using
system . I or if you have already have
this name spell then just leave it like
that or otherwise just add this to your
code
okay once again i will go to the court I
will just publishing this video button
and all the contain content will remain
the same from this Open File dialog to
the end of the catch block and do that
and of the if code what i will do is
after this if condition and here outside
this if condition i will write the code
for converting my string into the text
file so right stream writer and give it
a name x is equal to new stream know
screenwriter so here not screen reader
but screenwriter this one x is equal to
new streamwriter record and record lost
and in the bracket you can give the part
of your PDF file in the name of the PDF
file so you can give like see something
like this
the bill coach and then C and E the f2
next dot txt because it's a text file so
you can give the pot like this and this
is name of the text file which we are
generating but because i'm generating my
txt file in my binary folder
what is a binary folder just go to your
project and right click it and click
open folder in windows explorer and it
will open your project folder total bill
and go to debug if you are running a
programming debug mode if you're running
and release them go to release mode and
in here my txt file is generated will be
generated that's why I'm not providing
any but i'm just giving the name of the
file
ok and in the next line right I'll copy
this file variable listed here . right
and in the bracket bracket close in here
we will pass our string so if you
remember in the last video we have
written the code to show our past PDF
text in the rich text box which is this
rich text box so what i will do is i
will just copy the name of this rich
text box copy and paste it here .
text ok so what this will do is find out
right in this code contains the or
discard writes the string or whatever
you pass in this bracket inside the
story inside your txt file so whatever
you write in this bracket will go into
your txt file and what we are passing
here is whatever were text which is
there in the rich text box which we have
passed from the PDF file we are
transferring all the texts and writing
it into the text file so it's indirectly
converting your PDF into the text file
and in after just right by . close
regular writing so just write these
three lines and this is of course the
rich text box . text which contains your
past PDF text and now i will run the
code once again
username and password and forced to
follow me open that debug folder so you
will be able to see also that the text
file is generated on not so i will click
this read video and see here also i will
just select this text or PDF file and
open it
and you see here it has generated my
people PDF to txt txt file so whatever
is here in the PDF or whatever we read
from the PDF and we are showing in the
rich text box its converted into a text
file so just open it and it will be
having the same contain content as you
are
xbox vocabulary list family list
general & topic areas generally topical
areas 125 just so same text so in this
way you can convert your PDF file into a
text file i hope you have learned
something new this time please rate
comment and subscribe and bye for now
Video Length: 09:12
Uploaded By: ProgrammingKnowledge
Published: 4/29/2013
View Count: 31,026