Click here to Skip to main content
14,580,612 members
Rate this:
Please Sign up or sign in to vote.
See more:
How can I convert PDF to pptx using C# coding.
Please,help me read a file pdf
Updated 10-Jul-19 2:32am
Rate this:
Please Sign up or sign in to vote.

Solution 1

Get a copy of the iTextSharp/[^] library, to read the PDF files. You will need the Microsoft.Office.Interop.PowerPoint [^] classes to write the ppt files.
thatraja 13-Nov-11 14:20pm
Right, 5!
CuongPham 14-Nov-11 2:43am
I used it...but I can't read file pdf on form .
Richard MacCutchan 14-Nov-11 4:06am
Sorry, but I have no experience of this library. If you have a specific code problem then post a new question with fule description, the failing code and any error messages or status codes.
CuongPham 16-Nov-11 23:25pm
uhm...I used Pdfbox to read a pdf file...but I had problem :
PdfDocument pdfdoc = PdfDocument.load(filename);
PDFTextStripper stripper = new PDFTextStripper();
return stripper.getText(pdfdoc);
- The type or namespace name 'PdfDocument' could not be found (are you missing a using directive or an assembly referrence).
- The name 'PdfDocument' does not exist in the current context.
Richard MacCutchan 17-Nov-11 3:33am
Well, that message is quite clear; add the correct reference to your project, and the associated using statement to your source module. These are basic C# issues which you should understand if you are developing C# programs.
CuongPham 17-Nov-11 8:13am
I added reference in your project and using library but it had errorr
Rate this:
Please Sign up or sign in to vote.

Solution 2

The solution above is no longer applicable for large conversions. iTextSharp has since switched to version 7, and paid. The only solution would be to programatically create a PPTX file through OpenXML.
Maciej Los 1-Jul-19 16:43pm
Not true! iText7 has 2 version of licensing. Community is based on AGPL. More at: iText site.
BTW: OP did not mention that he/she wants to use it for commercial purposes.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100