Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #26525

    Hi, i have a document that is build from a SQL query of a field that contains HTML previously entered by a HTMLEditor. Everything is fine but when i want to display the document from a client the document shows on the server not in the client machine, and of course i need the document shows on client machine i use the following code:

    try {
    /*no funca*/
    // File f = new File(“file://localhost/AsignaNombre.pdf”); //doesn’t work
    fos = new FileOutputStream(“test.pdf “);
    } catch (FileNotFoundException fe) {

    }catch(Exception ex){

    }
    cPD4ML pd4ml = new cPD4ML();
    //abre el pdf inicio
    try {
    …..
    [database query with Resulset ]
    ……
    //HTMLString store the HTML from the Oracle’s CLOB query
    pd4ml.render(new StringReader(HTMLString),output);
    fos.close();
    } catch (Exception e) {

    }

    try { // this shows the document on screen
    Runtime.getRuntime().exec(“rundll32 url.dll,FileProtocolHandler test.pdf”);
    } catch (IOException ioe) {
    // TODO
    System.out.println(“Problema al abrir PDF “+ioe.getMessage());
    ioe.printStackTrace();
    }
    i’m testing pd4ml evaluation if everything is right my company buy the licence, help me

    #28443

    In order to show the document on client machine, you need to consider a web scenario (to deliver generated document to the machine by HTTP). There are many PD4ML servlet or JSP samples, which do the trick.

    #28444

    @PD4ML wrote:

    In order to show the document on client machine, you need to consider a web scenario (to deliver generated document to the machine by HTTP). There are many PD4ML servlet or JSP samples, which do the trick.

    Thanks in fact the problem was in java because it render on server meanwhile javascript render on client. A call from Javascript solves the problem.

    Thanks for your time

Viewing 3 posts - 1 through 3 (of 3 total)

The forum ‘General questions / FAQ’ is closed to new topics and replies.