Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #2760 > unrolled thread

PDF Processing

Started by"imranbaseer" <imranbaseer@THRWHITE.remove-dii-this>
First post2011-04-27 15:40 +0000
Last post2011-04-27 15:41 +0000
Articles 13 — 7 participants

Back to article view | Back to comp.lang.java.gui


Contents

  PDF Processing "imranbaseer" <imranbaseer@THRWHITE.remove-dii-this> - 2011-04-27 15:40 +0000
    Re: PDF Processing "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:40 +0000
      Re: PDF Processing "imranbaseer" <imranbaseer@THRWHITE.remove-dii-this> - 2011-04-27 15:41 +0000
        Re: PDF Processing "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:41 +0000
          Re: PDF Processing "imranbaseer" <imranbaseer@THRWHITE.remove-dii-this> - 2011-04-27 15:41 +0000
            Re: PDF Processing "Ed Webb" <ed.webb@THRWHITE.remove-dii-this> - 2011-04-27 15:41 +0000
            Re: PDF Processing "Jeff Higgins" <jeff.higgins@THRWHITE.remove-dii-this> - 2011-04-27 15:41 +0000
              Re: PDF Processing "Jeff Higgins" <jeff.higgins@THRWHITE.remove-dii-this> - 2011-04-27 15:41 +0000
            Re: PDF Processing "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:41 +0000
            Re: PDF Processing "Tom N" <tom.n@THRWHITE.remove-dii-this> - 2011-04-27 15:41 +0000
            Re: PDF Processing "tar" <tar@THRWHITE.remove-dii-this> - 2011-04-27 15:41 +0000
      Re: PDF Processing "imranbaseer" <imranbaseer@THRWHITE.remove-dii-this> - 2011-04-27 15:41 +0000
    Re: PDF Processing "Roedy Green" <roedy.green@THRWHITE.remove-dii-this> - 2011-04-27 15:41 +0000

#2760 — PDF Processing

From"imranbaseer" <imranbaseer@THRWHITE.remove-dii-this>
Date2011-04-27 15:40 +0000
SubjectPDF Processing
Message-ID<7b403be9a8504@uwe>
  To: comp.lang.java.gui
Hi members,
     I am PDF Processing...When i tried to execute the following code ,it
thows NULLPOINTER exception...The exception occured at this line System.out.
println(view.getProperty("Default_Zoom_Type"));..... I dont know how to solve
tis.....Please refer the following code and give me the solution for this.....


                    Thank in advance...                                

import com.adobe.acrobat.Viewer;
import java.io.*;
public class PdfCheck1{
    public static void main(String ar[])throws Exception{
        Viewer view = new Viewer();
        InputStream input = new FileInputStream("E:\\Imran\\PRO\\PDF\\
ListofPages.
pdf");
        view.setDocumentInputStream(input);
        System.out.println(view.getPageCount());
        System.out.println(view.getProperty("Default_Zoom_Type"));
    }
}

with regards,
J.Imran Baseer.

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [next] | [standalone]


#2761

From"Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this>
Date2011-04-27 15:40 +0000
Message-ID<7b40e415bd6c4@uwe>
In reply to#2760
  To: comp.lang.java.gui
imranbaseer wrote:
..
>     I am PDF Processing...When i tried to execute the following code ,it
>thows NULLPOINTER exception...

Did you mean a NullPointerException?  

If so, 
a) Please don't SHOUT at us.
and
b) Please be specific.  

Programming is hard.  Debugging is harder.
Debugging an application remotely, where the 
exceptions and errors are being 'paraphrased' is 
even harder again.

Don't make it hard on us (please).

>...The exception occured at this line System.out.
>println(view.getProperty("Default_Zoom_Type"));

I would have guessed that if any property either does not
exist, or is not defined for that PDF file, it returns null.  

OTOH, that does not explain the exception, since the output
should simply have been 
null
like this line would print..
  System.out.println((String)null);

Indeed, the NPE suggests the viewer itself is null, but if 
so, the page count could not have been referenced on the
previous line*.  

*
>        System.out.println(view.getPageCount());

Which leads me to..
Please copy/paste the stacktrace.  As well as the 
output you are seeing.

-- 
Andrew Thompson
http://www.athompson.info/andrew/

Message posted via JavaKB.com
http://www.javakb.com/Uwe/Forums.aspx/java-gui/200711/1

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [next] | [standalone]


#2766

From"imranbaseer" <imranbaseer@THRWHITE.remove-dii-this>
Date2011-04-27 15:41 +0000
Message-ID<7b4b858f3642e@uwe>
In reply to#2761
  To: comp.lang.java.gui
OUTPUT FOR THAT PROGRAM:::
10
java.lang.NullPointerException
	at java.util.Hashtable.put(Unknown Source)
	at com.adobe.acrobat.gui.ReaderPrefs.getClientProperties(ReaderPrefs.java:
1063)
	at com.adobe.acrobat.Viewer.getProperties(Viewer.java:1191)
	at com.adobe.acrobat.Viewer.getProperty(Viewer.java:1186)
	at PdfPack.PdfCheck1.main(PdfCheck1.java:112)
Exception in thread "main" 

Andrew Thompson wrote:
>...
>>     I am PDF Processing...When i tried to execute the following code ,it
>>thows NULLPOINTER exception...
>
>Did you mean a NullPointerException?  
>
>If so, 
>a) Please don't SHOUT at us.
>and
>b) Please be specific.  
>
>Programming is hard.  Debugging is harder.
>Debugging an application remotely, where the 
>exceptions and errors are being 'paraphrased' is 
>even harder again.
>
>Don't make it hard on us (please).
>
>>...The exception occured at this line System.out.
>>println(view.getProperty("Default_Zoom_Type"));
>
>I would have guessed that if any property either does not
>exist, or is not defined for that PDF file, it returns null.  
>
>OTOH, that does not explain the exception, since the output
>should simply have been 
>null
>like this line would print..
>  System.out.println((String)null);
>
>Indeed, the NPE suggests the viewer itself is null, but if 
>so, the page count could not have been referenced on the
>previous line*.  
>
>*
>>        System.out.println(view.getPageCount());
>
>Which leads me to..
>Please copy/paste the stacktrace.  As well as the 
>output you are seeing.
>

-- 
Message posted via JavaKB.com
http://www.javakb.com/Uwe/Forums.aspx/java-gui/200711/1

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [next] | [standalone]


#2768

From"Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this>
Date2011-04-27 15:41 +0000
Message-ID<7b4baa6261a0a@uwe>
In reply to#2766
  To: comp.lang.java.gui
imranbaseer wrote:

Please post comments 'in-line'  as I do, rather than top-posting them...

>OUTPUT FOR THAT PROGRAM:::

OK.  No need to SHOUT!

>>Please copy/paste the stacktrace.  As well as the 
>>output you are seeing.
>10
>java.lang.NullPointerException
>	at java.util.Hashtable.put(Unknown Source)
>	at com.adobe.acrobat.gui.ReaderPrefs.getClientProperties(ReaderPrefs.java:
>1063)

Huhh..  That is odd, I thought HashTable was able to
accept 'null' values.

(I am bowing out of this thread, for the moment.  Hopefully
one of the Java gurus will spot the problem..)

-- 
Andrew Thompson
http://www.athompson.info/andrew/

Message posted via JavaKB.com
http://www.javakb.com/Uwe/Forums.aspx/java-gui/200711/1

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [next] | [standalone]


#2769

From"imranbaseer" <imranbaseer@THRWHITE.remove-dii-this>
Date2011-04-27 15:41 +0000
Message-ID<7b4bc60bc1aa0@uwe>
In reply to#2768
  To: comp.lang.java.gui
hey....coooool......i need answer,tats y i sent mutilple threads... If t s
not possible tell frankly........i tink u r weak n java.....dont waster ur
time with me k....bye....

Andrew Thompson wrote:
>Please post comments 'in-line'  as I do, rather than top-posting them...
>
>>OUTPUT FOR THAT PROGRAM:::
>
>OK.  No need to SHOUT!
>
>>>Please copy/paste the stacktrace.  As well as the 
>>>output you are seeing.
>[quoted text clipped - 3 lines]
>>	at com.adobe.acrobat.gui.ReaderPrefs.getClientProperties(ReaderPrefs.java:
>>1063)
>
>Huhh..  That is odd, I thought HashTable was able to
>accept 'null' values.
>
>(I am bowing out of this thread, for the moment.  Hopefully
>one of the Java gurus will spot the problem..)
>

-- 
Message posted via JavaKB.com
http://www.javakb.com/Uwe/Forums.aspx/java-gui/200711/1

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [next] | [standalone]


#2770

From"Ed Webb" <ed.webb@THRWHITE.remove-dii-this>
Date2011-04-27 15:41 +0000
Message-ID<oJf%i.40641$T8.16005@newsfe5-win.ntli.net>
In reply to#2769
  To: comp.lang.java.gui
imranbaseer wrote:
> hey....coooool......i need answer,tats y i sent mutilple threads... If t s
> not possible tell frankly........i tink u r weak n java.....dont waster ur
> time with me k....bye....
> 

Well good luck figuring it out on your own.

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [next] | [standalone]


#2771

From"Jeff Higgins" <jeff.higgins@THRWHITE.remove-dii-this>
Date2011-04-27 15:41 +0000
Message-ID<evg%i.15$VS6.9@newsfe07.lga>
In reply to#2769
  To: comp.lang.java.gui
haha 1 qwik sear in rt 4um bring ans qwik haha yahoo
"imranbaseer" <u39085@uwe> wrote in message news:7b4bc60bc1aa0@uwe...
> hey....coooool......i need answer,tats y i sent mutilple threads... If t s
> not possible tell frankly........i tink u r weak n java.....dont waster ur
> time with me k....bye....
>
> Andrew Thompson wrote:
>>Please post comments 'in-line'  as I do, rather than top-posting them...
>>
>>>OUTPUT FOR THAT PROGRAM:::
>>
>>OK.  No need to SHOUT!
>>
>>>>Please copy/paste the stacktrace.  As well as the
>>>>output you are seeing.
>>[quoted text clipped - 3 lines]
>>> at 
>>> com.adobe.acrobat.gui.ReaderPrefs.getClientProperties(ReaderPrefs.java:
>>>1063)
>>
>>Huhh..  That is odd, I thought HashTable was able to
>>accept 'null' values.
>>
>>(I am bowing out of this thread, for the moment.  Hopefully
>>one of the Java gurus will spot the problem..)
>>
>
> -- 
> Message posted via JavaKB.com
> http://www.javakb.com/Uwe/Forums.aspx/java-gui/200711/1
>

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [next] | [standalone]


#2772

From"Jeff Higgins" <jeff.higgins@THRWHITE.remove-dii-this>
Date2011-04-27 15:41 +0000
Message-ID<yBg%i.31$VS6.10@newsfe07.lga>
In reply to#2771
  To: comp.lang.java.gui

..bye...

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [next] | [standalone]


#2773

From"Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this>
Date2011-04-27 15:41 +0000
Message-ID<7b4cda855dbe2@uwe>
In reply to#2769
  To: comp.lang.java.gui
imranbaseer wrote:
>....dont waster ur time with me k.

Is that a question?  OK, happy to 'comply'.

>...bye....

Bye-bye.  *Plonk.*

-- 
Andrew Thompson
http://www.athompson.info/andrew/

Message posted via JavaKB.com
http://www.javakb.com/Uwe/Forums.aspx/java-gui/200711/1

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [next] | [standalone]


#2779

From"Tom N" <tom.n@THRWHITE.remove-dii-this>
Date2011-04-27 15:41 +0000
Message-ID<Xns99EB89A55B7AFndt601946x@61.9.191.5>
In reply to#2769
  To: comp.lang.java.gui
imranbaseer wrote:

> hey....coooool......i need answer,tats y i sent mutilple threads... If
> t s not possible tell frankly........i tink u r weak n java.....dont
> waster ur time with me k....bye....

I think you'll find something helpful here...
http://tinyurl.com/34ugs8

> Andrew Thompson wrote:
>>Please post comments 'in-line'  as I do, rather than top-posting
>>them... 
>>
>>>OUTPUT FOR THAT PROGRAM:::
>>
>>OK.  No need to SHOUT!
>>
>>>>Please copy/paste the stacktrace.  As well as the 
>>>>output you are seeing.
>>[quoted text clipped - 3 lines]
>>>     at
>>>     com.adobe.acrobat.gui.ReaderPrefs.getClientProperties
(ReaderPrefs
>>>     .java: 
>>>1063)
>>
>>Huhh..  That is odd, I thought HashTable was able to
>>accept 'null' values.
>>
>>(I am bowing out of this thread, for the moment.  Hopefully
>>one of the Java gurus will spot the problem..)
>>
>

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [next] | [standalone]


#2780

From"tar" <tar@THRWHITE.remove-dii-this>
Date2011-04-27 15:41 +0000
Message-ID<ymi3av58vwm.fsf@blackcat.isi.edu>
In reply to#2769
  To: comp.lang.java.gui
"imranbaseer" <u39085@uwe> writes:

> hey....coooool......i need answer,tats y i sent mutilple threads... If t s
> not possible tell frankly........i tink u r weak n java.....dont waster ur
> time with me k....bye....

Well, then I suggest you hire a consultant to give you those answers.
Posting to a free newsgroup, where the answers you get are from
volunteers, and then complaining about it is just bad manners.

-- 
Thomas A. Russ,  USC/Information Sciences Institute

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [next] | [standalone]


#2767

From"imranbaseer" <imranbaseer@THRWHITE.remove-dii-this>
Date2011-04-27 15:41 +0000
Message-ID<7b4b893ff529e@uwe>
In reply to#2761
  To: comp.lang.java.gui
10 is the number of pages of the pdf file.....
nullpointer exception in getproperty() method........

Andrew Thompson wrote:
>...
>>     I am PDF Processing...When i tried to execute the following code ,it
>>thows NULLPOINTER exception...
>
>Did you mean a NullPointerException?  
>
>If so, 
>a) Please don't SHOUT at us.
>and
>b) Please be specific.  
>
>Programming is hard.  Debugging is harder.
>Debugging an application remotely, where the 
>exceptions and errors are being 'paraphrased' is 
>even harder again.
>
>Don't make it hard on us (please).
>
>>...The exception occured at this line System.out.
>>println(view.getProperty("Default_Zoom_Type"));
>
>I would have guessed that if any property either does not
>exist, or is not defined for that PDF file, it returns null.  
>
>OTOH, that does not explain the exception, since the output
>should simply have been 
>null
>like this line would print..
>  System.out.println((String)null);
>
>Indeed, the NPE suggests the viewer itself is null, but if 
>so, the page count could not have been referenced on the
>previous line*.  
>
>*
>>        System.out.println(view.getPageCount());
>
>Which leads me to..
>Please copy/paste the stacktrace.  As well as the 
>output you are seeing.
>

-- 
Message posted via JavaKB.com
http://www.javakb.com/Uwe/Forums.aspx/java-gui/200711/1

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [next] | [standalone]


#2765

From"Roedy Green" <roedy.green@THRWHITE.remove-dii-this>
Date2011-04-27 15:41 +0000
Message-ID<iurpj317i4alp8v8l1ra25354st7mibb9k@4ax.com>
In reply to#2760
  To: comp.lang.java.gui
On Thu, 15 Nov 2007 13:15:02 GMT, "imranbaseer" <u39085@uwe> wrote,
quoted or indirectly quoted someone who said :

>        view.setDocumentInputStream(input);
>        System.out.println(view.getPageCount());
>        System.out.println(view.getProperty("Default_Zoom_Type"));

I think it unlikely you safely managed to get view.getPageCount() and
then die on view.getProperty.

If view were null, the error would come on view.getPage(Count())
if the property were null, you would simply see the word "null", not a
NullPointerException.  Please add some debug code and check the line
number.
-- 
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.gui


csiph-web