You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by "Hesham G." <he...@gmail.com> on 2009/10/25 13:30:03 UTC

Upgrading from 0.73 to 0.8

Hello ,

Thanks for the great work PDFBox team ...

I have just upgraded PDFBox from v0.73 to v0.8 (The one from PDFBox website) and I used the attached FontBox v0.8.0 with it.
I don't know if anyone else had the same issue, but when I try to load any PDF file it stops at the line :
pdfFile = PDDocument.load( pdfFilePath );

I do not get any exception, it just stops at that line and can't load the file.
I was having an older version from the trunk, I think I downloaded it in May 2009, I tested it with FontBox v0.8.0 too and it worked just fine.
I have attached a small PDF sample I tried with both versions of PDFBox and worked fine with the old one.

Did anyone face the same problem ? And is it safe to use that old version from the trunk ?

Another thing please ... Why is the latest version big in size (4.5) MB ? The old versions where about (3.3) MB.

Best regards ,
Hesham

Re: Upgrading from 0.73 to 0.8

Posted by "Hesham G." <he...@gmail.com>.
Thanks Andreas  ... I downloaded it and it is now working fine.
Is there some way I can disable the logging ? It causes much overhead to my 
program in runtime.

Best regards ,
Hesham

--------------------------------------------------
From: "Andreas Lehmkühler" <an...@lehmi.de>
Sent: Monday, October 26, 2009 8:15 AM
To: <pd...@incubator.apache.org>
Subject: Re: Upgrading from 0.73 to 0.8

> Hi,
> Hesham G. schrieb:
>> Hi Andreas ,
>>
>> Thanks for your reply.
>>
>>>> What do you mean by it just stops at that particular line? How do you
>>>> determine that without having a stack trace or something like that?
>> I am using eclipse, where I put a number of breaking points until I
>> discover which line the code stops in.
>> -----------------------------------
>>
>>>> Everything works fine for me. Do you have all needed jars on your
>>>> classpath?
>> Yes, I have them all. And I have just created now a small sample that
>> loads a pdf file and adds 1 page to it, I've got this Exception :
>> Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError:
>> org/apache/commons/logging/LogFactory
>>     at 
>> org.apache.pdfbox.pdfparser.BaseParser.<clinit>(BaseParser.java:58)
>>     at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:840)
>>     at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:808)
>>     at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:733)
>>     at com.view.Class2.button4MouseClicked(Class2.java:358) -------->
>> This line : " pdfFile = PDDocument.load( filePath ); "
> The commons-logging.jar is missing. You will find it at [1], the known
> maven repository or by building pdfbox using the included ant skript.
>
> BR
> Andreas Lehmkühler
>
> [1] http://commons.apache.org/downloads/download_logging.cgi
> 

Re: Upgrading from 0.73 to 0.8

Posted by Andreas Lehmkühler <an...@lehmi.de>.
Hi,
Hesham G. schrieb:
> Hi Andreas ,
> 
> Thanks for your reply.
> 
>>> What do you mean by it just stops at that particular line? How do you
>>> determine that without having a stack trace or something like that?
> I am using eclipse, where I put a number of breaking points until I
> discover which line the code stops in.
> -----------------------------------
> 
>>> Everything works fine for me. Do you have all needed jars on your
>>> classpath?
> Yes, I have them all. And I have just created now a small sample that
> loads a pdf file and adds 1 page to it, I've got this Exception :
> Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError:
> org/apache/commons/logging/LogFactory
>     at org.apache.pdfbox.pdfparser.BaseParser.<clinit>(BaseParser.java:58)
>     at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:840)
>     at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:808)
>     at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:733)
>     at com.view.Class2.button4MouseClicked(Class2.java:358) -------->
> This line : " pdfFile = PDDocument.load( filePath ); "
The commons-logging.jar is missing. You will find it at [1], the known
maven repository or by building pdfbox using the included ant skript.

BR
Andreas Lehmkühler

[1] http://commons.apache.org/downloads/download_logging.cgi

Re: Upgrading from 0.73 to 0.8

Posted by "Hesham G." <he...@gmail.com>.
Hi Andreas ,

Thanks for your reply.

>> What do you mean by it just stops at that particular line? How do you 
>> determine that without having a stack trace or something like that?
I am using eclipse, where I put a number of breaking points until I discover 
which line the code stops in.
-----------------------------------

>> Everything works fine for me. Do you have all needed jars on your 
>> classpath?
Yes, I have them all. And I have just created now a small sample that loads 
a pdf file and adds 1 page to it, I've got this Exception :
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: 
org/apache/commons/logging/LogFactory
	at org.apache.pdfbox.pdfparser.BaseParser.<clinit>(BaseParser.java:58)
	at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:840)
	at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:808)
	at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:733)
	at com.view.Class2.button4MouseClicked(Class2.java:358) --------> This line 
: " pdfFile = PDDocument.load( filePath ); "

While that same sample works fine with the previous PDFBox versions.

Best regards ,
Hesham


--------------------------------------------------
From: "Andreas Lehmkühler" <an...@lehmi.de>
Sent: Sunday, October 25, 2009 8:04 PM
To: <pd...@incubator.apache.org>
Subject: Re: Upgrading from 0.73 to 0.8

> Hi,
>
> Hesham G. schrieb:
>>
>> Hello ,
>>
>> Thanks for the great work PDFBox team ...
>>
>> I have just upgraded PDFBox from v0.73 to *v0.8* (The one from PDFBox
>> website) and I used the attached *FontBox v0.8.0* with it.
>> I don't know if anyone else had the same issue, but when I try to load
>> any PDF file it stops at the line :
>>
>> pdfFile = PDDocument./load/( pdfFilePath );
>>
>> I do not get any exception, it just stops at that line and can't load
>> the file.
> What do you mean by it just stops at that particular line? How do you
> determine that without having a stacktrace or something like that?
>
>> I was having an older version from the trunk, I think I downloaded it in
>> *May 2009*, I tested it with *FontBox v0.8.0 *too and it worked just 
>> fine.
>> I have attached a small PDF sample I tried with both versions of PDFBox
>> and worked fine with the old one.
>>
>> *Did anyone face the same problem ? And is it safe to use that old
>> version from the trunk ?*
> Everthings works fine for me. Do you have all needed jars on your 
> classpath?
>
>> **
>> Another thing please ... *Why is the latest version big in size (4.5) MB
>> ?* The old versions where about (3.3) MB.
> There are a lot more mapping files in the Resources/cmap directory,
> which are responsible for the increasing size.
>
>> Best regards ,
>> Hesham
>
> BR
> Andreas Lehmkühler
> 

Re: Upgrading from 0.73 to 0.8

Posted by Andreas Lehmkühler <an...@lehmi.de>.
Hi,

Hesham G. schrieb:
> 
> Hello ,
>  
> Thanks for the great work PDFBox team ...
>  
> I have just upgraded PDFBox from v0.73 to *v0.8* (The one from PDFBox
> website) and I used the attached *FontBox v0.8.0* with it.
> I don't know if anyone else had the same issue, but when I try to load
> any PDF file it stops at the line :
> 
> pdfFile = PDDocument./load/( pdfFilePath );
> 
> I do not get any exception, it just stops at that line and can't load
> the file.
What do you mean by it just stops at that particular line? How do you
determine that without having a stacktrace or something like that?

> I was having an older version from the trunk, I think I downloaded it in
> *May 2009*, I tested it with *FontBox v0.8.0 *too and it worked just fine.
> I have attached a small PDF sample I tried with both versions of PDFBox
> and worked fine with the old one.
>  
> *Did anyone face the same problem ? And is it safe to use that old
> version from the trunk ?*
Everthings works fine for me. Do you have all needed jars on your classpath?

> ** 
> Another thing please ... *Why is the latest version big in size (4.5) MB
> ?* The old versions where about (3.3) MB.
There are a lot more mapping files in the Resources/cmap directory,
which are responsible for the increasing size.

> Best regards ,
> Hesham

BR
Andreas Lehmkühler