Forum Replies Created

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • in reply to: PD4ML Does Nothing in Secure Environment?
    #28524

    Can you venture a guess as to why the Java code essentially gets completely thrown out of the method that renders the PDF without being caught by the exception handler?

    in reply to: PD4ML Does Nothing in Secure Environment?
    #28522

    Yes. Our client’s entire environment is HTTPS and firewalled, etc. We view the results of the server log and can see the HTML stream that is fed to PD4ML and as a test, we used very basic HTML as shown in my first post, so there no CSS nor are there any images, just a small bit of valid HTML. It renders fine in our development environment, but in theirs, the log displays the PD4ML version and then nothing else. We have PD4ML debug turned on. Please tell us how to fix this.

    Thanks,

    Tim

    in reply to: PD4ML Does Nothing in Secure Environment?
    #28520

    Someone from PD4ML Please answer this question!?! We need to get this to work for a customer delivery.

    Thanks,

    Tim

    in reply to: Using CustomFileResourceProvider
    #27911

    Actually, i do have a question regarding this class. I’m noticing that the BufferedInputStream is created (bis), but never used. Should bis be used instead of is to read the data?

    Thanks,

    Tim

    Also, note how we modified it to catch and report the exceptions. Let me know if this is still ok, please.

    public byte[] getResourceAsBytes(String resource, boolean debugOn) throws IOException {
    ByteArrayOutputStream fos = new ByteArrayOutputStream();
    byte buffer[] = new byte[2048];
    
    InputStream is = null;
    BufferedInputStream bis = null;
    
    try {
    URL src = new URL(resource);
    URLConnection urlConnect = src.openConnection();
    urlConnect.connect();
    is = urlConnect.getInputStream();
    bis = new BufferedInputStream(is);
    
    int read;
    do {
    read = is.read(buffer, 0, buffer.length);
    if (read > 0) {
    fos.write(buffer, 0, read);
    }
    } while (read > -1);
    
    } catch (Exception e) {
    e.printStackTrace();
    return new byte[0];
    } finally {
    fos.close();
    bis.close();
    is.close();
    }
    
    return fos.toByteArray();
    }

    in reply to: Using CustomFileResourceProvider
    #27909

    Nevermind. I’ve got it working.

    in reply to: Newbie question: How to page break
    #27865

    Yup tried that and a few other permutations…didn’t work, but thanks again.

    in reply to: Newbie question: How to page break
    #27863

    Thanks for the reply. Unfortunately, using <pd4ml-page-break> also causes our processor to barf. I’ve got a workaround in the Java code, but I would have preferred not to have to go that route. But, at least it works.

    Thanks again.

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