Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #26478

    Hi, I am trying to convert a HTML-styled String (for instance: “my text to show) to a pdf using streams:

    StringReader isr2 = new StringReader(myhtmlstringl);
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    pd4ml.render(isr2, baos);
    if I use a fieoutputstream, the pdf is created but show a blank page.
    and if I use the bytearrayoutputstream, what can I do for show the pdf-result in my webpage.


    Among PD4ML examples there is class, which ilustrates how to use PD4ML in web scenarios (just ignore SSL stuff there).

    At first glance your Java code seems to be correct. So I would suspect source HTML as a reason of blank PDFs. Do you really have opening tag at the end of your HTML code? Please try to remove it – it may confuse the HTML parser.

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

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