You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by te...@techworldsoftwares.com on 2009/01/17 07:26:37 UTC
PDFBOX .NET Library Exception Help
Hello Sir/Madam,
This is Tejas Patel, Sr. Software Developer from Techworld Softwares.
I've implemented PDFBOX .NET Library in my project to extract text from PDF File and I'm glad to
inform you that Its working good except sometimes when It throws exception like 'The type initializer
for 'java.io.File' threw an exception.' when I try to load a PDF document. I've add reference to 3 .dll files
for PDF text extraction operation.
They are namely,
1) acPDFCreator.Net.dll
2) acPDFCreatorLib.Net.dll
3) PDFBox-0.7.2.dll
Code that I've Written is as follows.
Dim OPDFDoc As PDDocument = Nothing
Dim TextStripper As PDFTextStripper = Nothing
Dim AllText As String = ""
OPDFDoc = PDDocument.load(inFileName) --> Throws Exception on this line
TextStripper = New PDFTextStripper
AllText = TextStripper.getText(OPDFDoc)
So Can you please Let me know that cause of this exception as soon as possible ?
Thank you.
Regards,
Tejas Patel
tejas@techworldsoftwares.com
Re: PDFBOX .NET Library Exception Help
Posted by Daniel Wilson <wi...@gmail.com>.
yes, in .Net ... you most likely do not have the IKVM.Runtime dll in the
same folder as PDFBox.
hth,
Daniel
On Sat, Jan 17, 2009 at 1:26 AM, <te...@techworldsoftwares.com> wrote:
> Hello Sir/Madam,
>
> This is Tejas Patel, Sr. Software Developer from Techworld Softwares.
> I've implemented PDFBOX .NET Library in my project to extract text from PDF
> File and I'm glad to
>
> inform you that Its working good except sometimes when It throws exception
> like 'The type initializer
>
> for 'java.io.File' threw an exception.' when I try to load a PDF document.
> I've add reference to 3 .dll files
>
> for PDF text extraction operation.
>
> They are namely,
>
> 1) acPDFCreator.Net.dll
> 2) acPDFCreatorLib.Net.dll
> 3) PDFBox-0.7.2.dll
>
> Code that I've Written is as follows.
>
> Dim OPDFDoc As PDDocument = Nothing
> Dim TextStripper As PDFTextStripper = Nothing
> Dim AllText As String = ""
>
> OPDFDoc = PDDocument.load(inFileName) --> Throws Exception on this line
> TextStripper = New PDFTextStripper
> AllText = TextStripper.getText(OPDFDoc)
>
>
> So Can you please Let me know that cause of this exception as soon as
> possible ?
>
> Thank you.
>
> Regards,
> Tejas Patel
> tejas@techworldsoftwares.com
>