Forum Replies Created

Viewing 15 posts - 406 through 420 (of 4,249 total)
  • Author
    Posts
  • in reply to: Base URL Issue
    #27834

    I am afraid the trick with JavaScript is not going to work. PD4ML does not support JavaScript. The source HTML should already have “CHECKED” attributes on their places.

    in reply to: Base URL Issue
    #27835

    Actually,
    This code is working quite well. It is executed on the client browser prior to getting the copy of the HTML. I refactored the code and am reposting it :

    function processFormData(oForm) {
    var e, i = 0;
    while (e = oForm.elements[i++]) {
    if (e.type == ‘checkbox’ || e.type == ‘radio’) {
    if (e.checked == true) {
    e.defaultChecked = true;
    } else {
    e.defaultChecked = false;
    }
    }
    if (e.type == ‘select’) { // Still needs to be done
    }
    }
    }

    in reply to: HTML/CSS rendering issues
    #26332

    I am using pd4ml.pro.trial.360b3 (our registered version is a pro one of older date and we are evaluating the newest one for its fit for the present task) and I am bumping into an issue we have had for some time already.

    We use PD4ML to generate PDF from regular pages of our front-end, and as such, we try to pass them to the library as little altered as possible.

    We are setting the document BASE for relative external resoutrces, which works all fine…except for CSS.

    Our CSS is being referenced in a way sich like this (mightysite.dom is in reality a proper existing domain)
    <br /> <head><base href="http://www.mightysite.dom/" /><br /> <link type="text/css" rel="stylesheet" href="http://www.mightysite.dom/static/generated/StoreFront/styles/main.ipm/dgnportalvsportal_l0.css?version=1265703941452"><br /> <link type="text/css" rel="stylesheet" href="http://www.mightysite.dom/static/generated/StoreFront/styles/content.ipm/dgnportalvsportal_l0.css?version=1265703941483"><br /> ...<br />

    and the CSS doesn’t seem to have any effect at all. It is being returned with the “text/css” content type.

    Outputting all CSS into the main HTML document works well, though, as an unpleasant workaround, we’d like to be able to resign on this.

    Is there a known issue regarding external stylesheets – is it not a recommended way at all, or are we just doing something PD4ML doesn’t like?

    If any further information or code can help you understand/identify the issue, please let me know.

    Thanks a lot.

    in reply to: External stylesheets by LINK tag – not evaluated at all?
    #27851

    First I would switch debug info on (pd4ml.enableDebugInfo()) and inspect the stdout or server’s log.

    Please make sure that mightysite.dom alias(?) is known to the server (not only to your web-browser): try to traceroute/ping/http to mightysite.dom from the server, where your PD4ML-enabled application is located.

    in reply to: External stylesheets by LINK tag – not evaluated at all?
    #27852

    First, thank you very much for your quick reply. The code is being run on mightysite.dom itself and it is known to itself. The problem shouldn’t originate there. Images, for example, are being downloaded fine.

    As for the debug info, that is a slight problem, because the PD4ML library is being used internally by our own module, so it’s one level too depp for me. Can’t easily access and modify PD4MLs properties. I’ll see what I can do.

    So, in principle, you say that the external stylesheets should work…right?

    in reply to: External stylesheets by LINK tag – not evaluated at all?
    #27853

    > The code is being run on mightysite.dom itself and it is known to itself.

    It is a usual situation a server is behind the firewall, and its external name (like myserver.com) is known only to reverse proxy. In the corporative internet the server appears under a “cryptic” no-way-to-remember name.

    But you are right: if it loads the images, it is not an issue for your environment.

    The debug output should give you a clue if it tries to load any CSS at all.

    Also a severe syntax error in CSS may fail the entire stylesheet – you’ll find traces of that (if any) in the log file.

    in reply to: General questions / FAQ
    #26331

    Is there any way to use CSS in the header? I would like to use a background color. Thanks!

    in reply to: CSS in the header
    #27847

    Yes. For example try to define the header like that:

    [language=xml:16ktfbhs]

    Header text: $[page] of $[total]

    [/language:16ktfbhs]

    in reply to: CSS in the header
    #27848

    I think I see what you are saying here. Now my question is: can I have dynamic content in the header based on what is in a variable as the page is being rendered?
    The value of myVar will change as the page is being rendered.

    [language=xml:3e5dmwzd] <%=myVar%> [/language:3e5dmwzd]
    I am new to PD4ML — thanks for the help!

    in reply to: Troubleshooting
    #26333

    Hello,

    We are getting an IllegalArgumentException while converting an HTML document. It’s not obvious what’s wrong in the HTML that caused this error. Is it possible that we can get the source code so we can step through the debugger? We are a volume license customer.

    Best regards,

    Caused by: java.lang.IllegalArgumentException
    at sun.net.www.ParseUtil.decode(ParseUtil.java:189)
    at sun.net.www.protocol.file.Handler.openConnection(Handler.java:65)
    at sun.net.www.protocol.file.Handler.openConnection(Handler.java:55)
    at java.net.URL.openConnection(URL.java:945)
    at org.zefer.cache.c.getResourceAsBytes(Unknown Source)
    at org.zefer.cache.ResourceCache.getObject(Unknown Source)
    at org.zefer.cache.ResourceCache.getObject(Unknown Source)
    at org.zefer.cache.ResourceCache.getImage(Unknown Source)
    at org.zefer.html.doc.o.OO0000(Unknown Source)
    at org.zefer.html.doc.o.super(Unknown Source)
    at org.zefer.html.doc.ab.super(Unknown Source)
    at org.zefer.html.doc.b.d.o00000(Unknown Source)
    at org.zefer.html.doc.ab.super(Unknown Source)
    at org.zefer.html.doc.b.d.o00000(Unknown Source)
    at org.zefer.html.doc.ab.super(Unknown Source)
    at org.zefer.html.doc.p.super(Unknown Source)
    at org.zefer.html.doc.m.super(Unknown Source)
    at org.zefer.html.doc.b.d.o00000(Unknown Source)
    at org.zefer.html.doc.ab.super(Unknown Source)
    at org.zefer.html.doc.b.d.o00000(Unknown Source)
    at org.zefer.html.doc.ab.super(Unknown Source)
    at org.zefer.html.doc.b.d.o00000(Unknown Source)
    at org.zefer.html.doc.ab.super(Unknown Source)
    at org.zefer.html.doc.p.super(Unknown Source)
    at org.zefer.html.doc.m.super(Unknown Source)
    at org.zefer.html.doc.b.d.o00000(Unknown Source)
    at org.zefer.html.doc.ab.super(Unknown Source)
    at org.zefer.html.doc.b.d.o00000(Unknown Source)
    at org.zefer.html.doc.ab.super(Unknown Source)
    at org.zefer.html.doc.Document.paint(Unknown Source)
    at org.zefer.pd4ml.PD4ML.super(Unknown Source)
    at org.zefer.pd4ml.PD4ML.render(Unknown Source)

    in reply to: CSS in the header
    #27849

    It is easy to mix different methods to define HTML headers in PD4ML.

    So first please take a look to the following topic:
    html-pdf-faq-f1/pdf-page-headers-footers-definition-options-t41.html

    In the code
    [language=xml:26hdax88] <%=myVar%> [/language:26hdax88]
    <%=myVar%> will be substituted with myVar value before the document is passed to PD4ML. So from PD4ML perspective it is going to be a static text (value). The only variable dynamically changes its value from page to page is $[page]

    To define different headers for different pages you need to do something like that:
    [language=xml:26hdax88] <%=myVar%> <%=myAnotherVar%> yet another var or static text [/language:26hdax88]

    in reply to: How to debug IllegalArgumentException
    #27854

    Obviously the exception is thrown in the standard JDK classes and the “problem” method (sun.net.www.protocol.file.Handler.openConnection (Handler.java:55)) has anything to do with URL connections.

    A good strategy in the case would be to switch PD4Ml debug on (pd4ml.enableDebugInfo()) and to inspect STDOUT (or server’s log) for the last URL it tried to connect.

    in reply to: CSS in the header
    #27850

    That is what I needed to know – I really think it is a great product!

    in reply to: Troubleshooting
    #26334

    Hi,

    We have written a java app (actually, a portlet) that uses the regular PD4ML library. Some days it works just fine but some days it fails (…after a few tries, or right at the beginning, or every other click, etc.) very unpredictably. Instead of a PDF I get:

      java.net.MalformedURLException: For input string: “280null”

      EXCEPTION:: null

    I have Googled this exception and now know that the “280” in “280null” is the port number used by the web server, but there was no really specific help out there. What happened to the rest of the URL (e.g., protocol, host name, path)? Why is it good sometimes and bad at other times?

    I’d appreciate any guidance on how to fix or debug. (Is there a way to enable some kind of verbose logging in PD4ML?)

    Thanks.

    Jeff

    in reply to: sometimes I get a MalformedURLException, and sometimes not
    #27855

    There is a big probability the exception is thrown before PD4ML takes control.
    To make sure, try to switch PD4ML debug on: pd4ml.enableDebugInfo()

    Are there any error messages or exception stack traces in server’s log?

Viewing 15 posts - 406 through 420 (of 4,249 total)