Forum Replies Created

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #36925

    Thank you very much for your answer. I have moved the pd4ml-4.0.16.jar from the application/lib directory to the WEB-INF/lib.
    Unfortunately the result is the same! The same exception again and again:

    java.net.MalformedURLException: SRVE0238E: Resource paths must contain a preceding slash.
    	at com.ibm.ws.webcontainer.webapp.WebApp.getResource(WebApp.java:2453)
    	at com.ibm.ws.webcontainer.webapp.WebApp.getResourceAsStream(WebApp.java:2419)
    	at com.pd4ml.cache.ServletResourceProvider.getResourceAsStream(y:1928)
    	at com.pd4ml.ResourceProvider.getResourceAsBytes(y:2080)

    #36777

    Judging from the error stack, the PD4ML tries to load the image as a file, which cannot succeed with a servlet:

    at com.pd4ml.cache.ServletResourceProvider.getResourceAsStream(y:1928)
    at com.pd4ml.ResourceProvider.getResourceAsBytes(y:2080)
    at com.pd4ml.cache.e.new(y:404)
    at com.pd4ml.cache.e.return(y:380)
    at com.pd4ml.cache.FileCache.getImage(y:375)

    #36776

    I have switched to V4 and no longer use the V3 library. I don’t think it is a path problem of the pd4ml.jar either, because the
    library is found, otherwise the whole PDF printing would not work. I have included the HTML page for PDF printing via a JSP page
    and the taglib <%@ taglib uri="/WEB-INF/tlds/pd4tl.tld" prefix="pd4ml" %> and use the “transform”-tag. As I said, it still worked without problems in V3. In V4, something must have changed in the handling of the “img”-tag.

    in reply to: Non-Breaking Space ” “
    #36701

    Sorry, the “&nbsp;” was swallowed.
    In the example, it should read: Hello, World!

    in reply to: Incorrect page number alignment $[page]
    #36624

    Thank you very much for the useful information!
    Through your presentation of the internals I was able to solve another problem, that I had when I switched from V3 to V4: particularly long titles in the headline were wrapped. So I modified one of your variants for a short-term solution:

    pd4ml-page-header TD:nth-child(1) {
    	white-space: nowrap;
    }
    pd4ml-page-header TD:nth-child(3) {
    	width: 10%;
    	white-space: nowrap;
    	text-align: right;
    }

    In the long term, I will gradually change the templates to <pd4ml:page.header>.

    in reply to: Incorrect page number alignment $[page]
    #36610

    Wenn im <style> Bereich eine Formatierung mit

    <%@ taglib uri="/WEB-INF/tlds/pd4tl.tld" prefix="pd4tl"%><pd4tl:transform
      screenWidth="800"
      pageFormat="A4"
      pageOrientation="portrait"
      pageInsets="20,10,10,10,mm">
    <pd4tl:header
    	titleTemplate="$[title]"
    	titleAlignment="left"
    	pageNumberTemplate="Seite $[page] / $[total]"
    	pageNumberAlignment="right"
    	/>
    <html>
    <head>
    <title>Gefüllte Auberginenröllchen mit Tomaten-Paprika Ragout</title>
    <style type="text/css">
    td {
    	text-align: left;
    }
    </style>
    </head>
    <body style="background-color: lightgray;">
      <p>
        Hello, World!
      </p>
    </body>
    </html>
    </pd4tl:transform>

    Attachments:
    You must be logged in to view attached files.
Viewing 6 posts - 1 through 6 (of 6 total)