I need some trick to turn the response into a PDF stream. E. g. I have a
Bookmarkable Page PdfPAge
public class PdfPage extends WebPage {
public PdfPage (final PageParameters parameters) {
// Respond with PDF content.
}
}
Application.init() {
mountBookmarkablePage("/PdfGenerator", PdfPage.class);
Is it possible to let a WebPage create a pdfOutput? If I try to do the
following
Response r = getResponse();
if (r instanceof WebResponse) {
WebResponse wr = (WebResponse)r;
wr.reset();
OutputStream os = wr.getOutputStream();
try {
os.write(/*PDFcontent*/);
} catch (Exception e) {
e.printStackTrace();
}
}
}
I can see the Exception java.lang.IllegalStateException:
getOutputStream() has already been called for this response
The reason for this is: I did not find something like
BookmarkableResource in wicket. It is no problem to have a
DynaicResourceLink in a page but the displayes content is not
bookmarkable. Any Ideas?
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]