Hi

I am trying to write a PDF printer applet.  The applet is fed a URL of
the PDF, which it must query for the document, and then I want it to
print to a selected printer (drop-down list of
PrintServiceLookup.lookupPrintServices).  My applet's jar (and the
pdfbox jar) are signed, which got me around some initial permission issues.

I have used the PDDocument object's load(url) method to get the file. 
When I call PDDocument.print(), I get a popup dialog to select a
printer, but when I click the Print button, a whole lot of nothing
happens!  That's right - nothing.  No printer job queued, no error, the
dialog disappears, and that is all she wrote.

My code:

====code====
    private PDDocument pdfDocument;
    private String url = "http://localhost/test.pdf";;
... (snip) ...

                    if (pdfLoaded == false) {
                        pdfDocument = new PDDocument ();
                        pdfDocument.load(new URL (url));
                        pdfLoaded = true;
                    }
                    pdfDocument.print();
====code====

Is there something obvious I'm missing here?

Thank you for reading
Albie

-- 

[ Albie Janse van Rensburg ~ http://morph.telspace.co.za ]

All is fear in love and war.

Reply via email to