Forum Replies Created

Viewing 15 posts - 586 through 600 (of 4,246 total)
  • Author
    Posts
  • in reply to: image path error
    #27998

    yes but this result http://latex.codecogs.com/gif.latex?300dpitinysum is not the same! 🙁

    in reply to: image path error
    #28000

    The only workaround I found:
    http://latex.codecogs.com/gif.latex?300dpi%2520tiny%2520sum
    however it is not compatible with browsers 🙁

    Obviously it is a problem of URL pre-processing by PD4ML. We’ll check what could be done.

    Does the image generator have alternative “spaceless” syntax to achieve the same result?

    in reply to: image path error
    #28001

    I asked for it and I’m waiting an answer.

    But I think there isn’t any alternative. 🙁

    Thanks for your help

    Mk

    in reply to: Problem in applying margins
    #27901

    so pd4ml:transform doesn’t work if embedded in raw HTML for processing via pd4ml.render(HTMLInputStream, pdfOutputStream);? I’m looking to set up templates with page orientation data in them but have been struggling with getting them to work. I’d prefer to not have to code the Java handler to set the orientation…

    sample HTML:
    <pd4ml:transform pageOrientation="landscape"><br /> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"<br /> "http://www.w3.org/TR/html4/loose.dtd"><br /> <html><br /> <head><br /> <title>landscape report - DEV</title><br /> ...

    in reply to: HTML/CSS rendering issues
    #26350

    Hi,

    We need to access a CSS file via HTTPS. I’ve read the threads and have realized that PD4ML does not support this (yet). Will you in the future?

    In the meantime, I am trying to implement the workaround you suggested. I have added the CustomFileResourceProvider class which is below. I have also added:

    <br /> HashMap map = new HashMap();<br /> map.put("pd4ml.extra.resource.loaders", "CustomFileResourceProvider");<br /> pd4ml.setDynamicParams(map);<br />

    After the creation of the pd4ml object. However, I do not understand where or when I need to call getResourceAsBytes. Could you please help me here?

    Thank you.

    Tim

    <br /> public byte[] getResourceAsBytes(String resource) throws IOException {<br /> ByteArrayOutputStream fos = new ByteArrayOutputStream();<br /> byte buffer[] = new byte[2048];<br /> <br /> InputStream is = null;<br /> <br /> PD4MLPrintPDF.so_log.debug("CustomFileResourceProvider - resource:" + resource + "n");<br /> URL src = new URL(resource);<br /> URLConnection urlConnect = src.openConnection();<br /> try {<br /> urlConnect.connect();<br /> } catch (Throwable e) {<br /> return new byte[0];<br /> }<br /> is = urlConnect.getInputStream();<br /> BufferedInputStream bis = new BufferedInputStream(is);<br /> <br /> int read;<br /> do {<br /> read = is.read(buffer, 0, buffer.length);<br /> if (read > 0) { // something to put down<br /> fos.write(buffer, 0, read);<br /> }<br /> } while (read > -1);<br /> <br /> fos.close();<br /> bis.close();<br /> is.close();<br /> <br /> return fos.toByteArray();<br /> }<br />

    in reply to: Using CustomFileResourceProvider
    #27909

    Nevermind. I’ve got it working.

    in reply to: Using CustomFileResourceProvider
    #27910

    Glad you got it working!

    Actually PD4ML does support HTTPS, but not in all environments. For example, Weblogic and WebSphere have SSL implementations not derived from the standard Java SSL classes, so they are not compatible with PD4ML.

    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.

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

    in reply to: HTML/CSS rendering issues
    #26384

    We are using PD4ML for Java 360fx1b1 for one of our projects and wonder about strange calls of URLs like $document_base_url/none when rendering pages as PDF.

    Debugging has identified this as the effect of following definitions in our CSS
    background-image: none;
    The same happens for the value ‘inherit’.
    Why does PD4ML attempt to download the none or inherit values as images, even though these are valid CSS values for background-image and PD4ML itself lists these as supported?

    Could this be in connection with our setting BASE meta tag for the document to the full URL of the document being rendered (as to be able to use external CSS)?

    Please let me know if any ruthre input can help you investigate the issue

    in reply to: Troubleshooting
    #26385

    I am trying to use the page.brake tag property ifSpaceBelowLessThan and it’s not working. The tag will break no matter what. Here is an example code.

    TEST of PDF Abilities


    THis is a repeating table
    [/color]

    in reply to: page.break ifSpaceBelowLessThan not working
    #28005

    In earlier versions of PD4ML any tag between and

    (not belongs to a particular table row) was ignored. But with PD4ML actual versions it should work.

    By the way: why do not you use TR { page-break-inside: avoid } CSS style to achieve identical result?

    #28002

    A bugfix will be available with v360fx1 release.

    in reply to: page.break ifSpaceBelowLessThan not working
    #28006

    Well the actual problem is that I’m am using this on a dynamic jsp form. I will not know how long or short the form will be. So I wanted to basically say to page brake when there is only 100 px left on the current pdf page. This form I a combination of tables and text.

    in reply to: page.break ifSpaceBelowLessThan not working
    #28007

    Actually in your sample you specified 1000px instead of 100px, which is quite a lot for a typical HTML document.

    in reply to: page.break ifSpaceBelowLessThan not working
    #28008

    Yeah I have tried adjusting from 0px to 1000px and there is never any change it always just brakes on where ever I place the page.break tag regardless. I just finished downloading the newest version and dropped the .jar and .tld and no change.

Viewing 15 posts - 586 through 600 (of 4,246 total)