Forum Replies Created

Viewing 15 posts - 676 through 690 (of 4,234 total)
  • Author
    Posts
  • #28051

    I suspect we are actually dealing with two problems. I’ve isolated the test case by creating the large HTML file that is to be converted to PDF using PD4ML and verified that it works in my IDE (Eclipse) When trying to convert the file using the exact same code as Notes agent it fails with the following dump: (Kindly read until end as there is more explanation after the dump)
    <br /> BlockElement(body) {line-height=1.2000000476837158, font-family=[Ljava.lang.String;@662f662f, display=block, width=900, margin-left=10, margin-top=0, margin-bottom=8, margin-right=8, font-size=16}<br /> ContentElement(pd4content) [ ] {line-height=1.2000000476837158, font-family=[Ljava.lang.String;@662f662f, display=block, font-size=16}<br /> ContentElement(pd4content) [ ] {line-height=1.2000000476837158, font-family=[Ljava.lang.String;@662f662f, display=block, font-size=16}<br /> <br /> com.sun.media.jai.codecimpl.util.ImagingException<br /> at com.sun.media.jai.codecimpl.ImagingListenerProxy.errorOccurred(ImagingListenerProxy.java:71)<br /> at com.sun.media.jai.codecimpl.JPEGImageEncoder.encode(JPEGImageEncoder.java:218)<br /> at com.cmti.pdfgen.TiffImageLoader.readAndConvertTiff(TiffImageLoader.java:87)<br /> at com.cmti.pdfgen.TiffImageLoader.getResourceAsBytes(TiffImageLoader.java:62)<br /> at org.zefer.cache.ResourceCache.getObjectAlternativeWay(Unknown Source)<br /> at org.zefer.cache.ResourceCache.getObject(Unknown Source)<br /> at org.zefer.cache.ResourceCache.getObject(Unknown Source)<br /> at org.zefer.cache.ResourceCache.getImage(Unknown Source)<br /> at org.zefer.html.doc.n.thisvoid(Unknown Source)<br /> at org.zefer.html.doc.n.Õõ0000(Unknown Source)<br /> at org.zefer.html.doc.n.if(Unknown Source)<br /> at org.zefer.html.doc.b.b.o00000(Unknown Source)<br /> at org.zefer.html.doc.ab.o00000(Unknown Source)<br /> at org.zefer.html.doc.b.d.o00000(Unknown Source)<br /> at org.zefer.html.doc.ab.o00000(Unknown Source)<br /> at org.zefer.html.doc.Document.layout(Unknown Source)<br /> at org.zefer.pd4ml.PD4ML.o00000(Unknown Source)<br /> at org.zefer.pd4ml.PD4ML.render(Unknown Source)<br /> at org.zefer.pd4ml.PD4ML.render(Unknown Source)<br /> at PD4MLOnlyTest.render(PD4MLOnlyTest.java:40)<br /> at JavaAgent.NotesMain(Unknown Source)<br /> at lotus.domino.AgentBase.runNotes(Unknown Source)<br /> at lotus.domino.NotesThread.run(Unknown Source)<br /> Caused by: com.sun.media.jai.codecimpl.util.ImagingException: IOException occurs when encode the image.<br /> ... 22 more<br /> Caused by: java.io.IOException: reading encoded JPEG Stream<br /> at sun.awt.image.codec.JPEGImageEncoderImpl.writeJPEGStream(Native Method)<br /> at sun.awt.image.codec.JPEGImageEncoderImpl.encode(JPEGImageEncoderImpl.java:484)<br /> at sun.awt.image.codec.JPEGImageEncoderImpl.encode(JPEGImageEncoderImpl.java:240)<br /> at com.sun.media.jai.codecimpl.JPEGImageEncoder.encode(JPEGImageEncoder.java:215)<br /> ... 21 more<br /> Caused by:<br /> com.sun.media.jai.codecimpl.util.ImagingException: IOException occurs when encode the image.<br /> at com.sun.media.jai.codecimpl.JPEGImageEncoder.encode(JPEGImageEncoder.java:218)<br /> at com.cmti.pdfgen.TiffImageLoader.readAndConvertTiff(TiffImageLoader.java:87)<br /> at com.cmti.pdfgen.TiffImageLoader.getResourceAsBytes(TiffImageLoader.java:62)<br /> at org.zefer.cache.ResourceCache.getObjectAlternativeWay(Unknown Source)<br /> at org.zefer.cache.ResourceCache.getObject(Unknown Source)<br /> at org.zefer.cache.ResourceCache.getObject(Unknown Source)<br /> at org.zefer.cache.ResourceCache.getImage(Unknown Source)<br /> at org.zefer.html.doc.n.thisvoid(Unknown Source)<br /> at org.zefer.html.doc.n.Õõ0000(Unknown Source)<br /> at org.zefer.html.doc.n.if(Unknown Source)<br /> at org.zefer.html.doc.b.b.o00000(Unknown Source)<br /> at org.zefer.html.doc.ab.o00000(Unknown Source)<br /> at org.zefer.html.doc.b.d.o00000(Unknown Source)<br /> at org.zefer.html.doc.ab.o00000(Unknown Source)<br /> at org.zefer.html.doc.Document.layout(Unknown Source)<br /> at org.zefer.pd4ml.PD4ML.o00000(Unknown Source)<br /> at org.zefer.pd4ml.PD4ML.render(Unknown Source)<br /> at org.zefer.pd4ml.PD4ML.render(Unknown Source)<br /> at PD4MLOnlyTest.render(PD4MLOnlyTest.java:40)<br /> at JavaAgent.NotesMain(Unknown Source)<br /> at lotus.domino.AgentBase.runNotes(Unknown Source)<br /> at lotus.domino.NotesThread.run(Unknown Source)<br /> Caused by: java.io.IOException: reading encoded JPEG Stream<br /> at sun.awt.image.codec.JPEGImageEncoderImpl.writeJPEGStream(Native Method)<br /> at sun.awt.image.codec.JPEGImageEncoderImpl.encode(JPEGImageEncoderImpl.java:484)<br /> at sun.awt.image.codec.JPEGImageEncoderImpl.encode(JPEGImageEncoderImpl.java:240)<br /> at com.sun.media.jai.codecimpl.JPEGImageEncoder.encode(JPEGImageEncoder.java:215)<br /> ... 21 more<br /> Caused by:<br /> java.io.IOException: reading encoded JPEG Stream<br /> at sun.awt.image.codec.JPEGImageEncoderImpl.writeJPEGStream(Native Method)<br /> at sun.awt.image.codec.JPEGImageEncoderImpl.encode(JPEGImageEncoderImpl.java:484)<br /> at sun.awt.image.codec.JPEGImageEncoderImpl.encode(JPEGImageEncoderImpl.java:240)<br /> at com.sun.media.jai.codecimpl.JPEGImageEncoder.encode(JPEGImageEncoder.java:215)<br /> at com.cmti.pdfgen.TiffImageLoader.readAndConvertTiff(TiffImageLoader.java:87)<br /> at com.cmti.pdfgen.TiffImageLoader.getResourceAsBytes(TiffImageLoader.java:62)<br /> at org.zefer.cache.ResourceCache.getObjectAlternativeWay(Unknown Source)<br /> at org.zefer.cache.ResourceCache.getObject(Unknown Source)<br /> at org.zefer.cache.ResourceCache.getObject(Unknown Source)<br /> at org.zefer.cache.ResourceCache.getImage(Unknown Source)<br /> at org.zefer.html.doc.n.thisvoid(Unknown Source)<br /> at org.zefer.html.doc.n.Õõ0000(Unknown Source)<br /> at org.zefer.html.doc.n.if(Unknown Source)<br /> at org.zefer.html.doc.b.b.o00000(Unknown Source)<br /> at org.zefer.html.doc.ab.o00000(Unknown Source)<br /> at org.zefer.html.doc.b.d.o00000(Unknown Source)<br /> at org.zefer.html.doc.ab.o00000(Unknown Source)<br /> at org.zefer.html.doc.Document.layout(Unknown Source)<br /> at org.zefer.pd4ml.PD4ML.o00000(Unknown Source)<br /> at org.zefer.pd4ml.PD4ML.render(Unknown Source)<br /> at org.zefer.pd4ml.PD4ML.render(Unknown Source)<br /> at PD4MLOnlyTest.render(PD4MLOnlyTest.java:40)<br /> at JavaAgent.NotesMain(Unknown Source)<br /> at lotus.domino.AgentBase.runNotes(Unknown Source)<br /> at lotus.domino.NotesThread.run(Unknown Source)<br /> Exception in thread "AgentThread: JavaAgent" java.lang.OutOfMemoryError<br /> at java.lang.StringBuffer.ensureCapacityImpl(StringBuffer.java:335)<br /> at java.lang.StringBuffer.append(StringBuffer.java:201)<br /> at org.zefer.pd4ml.pdf.c.Ôo0000(Unknown Source)<br /> at org.zefer.pd4ml.pdf.PD4Device.isNewPageNeeded(Unknown Source)<br /> at org.zefer.pd4ml.PD4ML.o00000(Unknown Source)<br /> at org.zefer.pd4ml.PD4ML.render(Unknown Source)<br /> at org.zefer.pd4ml.PD4ML.render(Unknown Source)<br /> at PD4MLOnlyTest.render(PD4MLOnlyTest.java:40)<br /> at JavaAgent.NotesMain(Unknown Source)<br /> at lotus.domino.AgentBase.runNotes(Unknown Source)<br /> at lotus.domino.NotesThread.run(Unknown Source)<br />

    I have three copies of the HTML file. One with no images at all and it runs fine in Both Eclipse and as a Notes agent. One with a small (4k) .png image in the header of every other page for a total of 100 images in a 200 page PDF. This also runs to completion in both Eclipse and Notes. The third HTML file has the same header images as the second and 4 TIFF images (one each on the 2nd, 4th, 6th and 8th page of the 200 page PDF output) This file runs fine on Eclipse but fails in the Notes agent with the above dump. The image sizes you requested for TiffImageLoader.getResourceAsBytes are:
    <br /> Image URL: file:///C:UsersXXXXXXXXXX/038/038011074/WS/057008072_WS.TIF<br /> BYTE SIZE: 31982<br /> Image URL: file:///C:UsersXXXXXXXXXX/028/028009113/WS/041013397_WS.TIF<br /> BYTE SIZE: 48640<br /> Image URL: file:///C:UsersXXXXXXXXXX/028/028009113/WS/047020674_WS.TIF<br /> BYTE SIZE: 48640<br /> Image URL: file:///C:UsersXXXXXXXXXX/048/048008877/WS/051006769_WS.TIF<br /> BYTE SIZE: 40704<br />
    Note that the TiffImageLoader class is one that you supplied in your examples.

    #28055

    .ini:
    JavaStackSize=819200

    default is 409600

    Seems it’s the stack not the heap causing the problem. I’ll continue to stress test this and keep this forum informed

    in reply to: uncorrect size for image
    #27817

    I think this is an issue of DPI. PD4ML seems to increase the image size by about 20%.

    What DPI does PD4ML render at?

    If I know that, I can potentially specify a smaller-than-normal height and width for the images in my image tags, so they render properly.

    To test this, try rendering any image and you will notice it’s larger on the PDF than on the web page, causing it to be pixelated.
    Like so:

    (Haven’t tried it without the width/height specified – could that be the cause?)

    in reply to: CSS Styles aren’t applied, can someone help me?
    #28059

    Thanks for your help PD4ML.

    I followed your instructions and am now passing the base URL to the render method. I also have debugging turned on. BTW, I am using the Pro version.

    Now when I do the conversion I get the following in the logs:

    <br /> version: PD4ML 351 Pro<br /> loading CSS file http://<someURL>/css.css<br /> not yet in cache: http://<someURL>/css.css<br /> image not yet in cache: http://<someURL>/images/<imagePath.image.gif><br /> not yet in cache: http://<someURL>/images/<imagePath.image.gif><br /> <br /> image size: 391<br /> done in 1938ms.<br />

    These logs would seem to me that everything was a success but the rendered PDF still doesn’t have the styles applied.

    There are also inline styles applied plus the CSS file. Is this disabling the application of the styles?

    Thanks for any help with this.

    in reply to: CSS Styles aren’t applied, can someone help me?
    #28060

    Any resolution to this? I’m having the exact same problem today.

    I’ve had success in the past using the JSP transform tag and it handled all references to CSS perfectly. But now, I’m trying to solve a problem that requires that I perform programmatic conversion of an HTML string in the same manner stated by the original poster and no matter what I try my CSS is ignored.

    These are the things that I have tried:

    1) Used the pd4ml.addStyle(,true), where was a fully qualified path to the resource. Debugging showed that the css resource was found and brought into the cache, yet the styles were not applied.

    2) Used the pd4ml.addStyle(, true), where held all of the styles in my CSS file. Styles were not applied.

    3) Included a stylesheet link tag in the head element of my HTML string with a fully qualified path to the CSS resource. Again, debug says that the css was found and brought into the cache, but styles were not applied.

    Steph.

    Steph.

    in reply to: CSS Styles aren’t applied, can someone help me?
    #28061

    Sorry Steph. No luck so far. The latest things that I’ve tried is to update to 360fx1 Pro as well as some of the things you’ve mentioned and nothing, zilch. I was able to load an image but no CSS.

    I’m beginning to think from the little I’ve found on the forum about developers trying this approach that it doesn’t really work. I am hoping to hear back from a PD4ML devleoper.

    I will keep you posted and please do the same.

    thanks

    in reply to: CSS Styles aren’t applied, can someone help me?
    #28062

    Finally.

    using useServletContext() and absolute paths resolved my issues.

    in reply to: General questions / FAQ
    #26404

    We are producing a document which needs different insets on the first page than all other pages. I tried to simulate this by (ab)using a dynamic page marker and generate a specific header (div style=height: xypx) for the first and all other pages. But it appears like the layouting engine doesn’t really take the headers/footers into account.

    Is there a way to define dynamic insets? Perhaps similar to the current pagemarker model? Otherwise we would have to fall back to use multiple pd4ml runs and concat everything together with iText. But we’d rather use one tool for this project.

    Thanks for your help!
    Reto

    #28056

    Currently we work on a PD4ML version, which is able to cache resources in /tmp directory, which should help to reduce memory utilization. Please contact support pd4ml com if you are interested to give a try to a development build.

    in reply to: CSS Styles aren’t applied, can someone help me?
    #28063

    I’m having the same problem. Will you please give details on where you used absolute paths? Thanks.

    in reply to: CSS Styles aren’t applied, can someone help me?
    #28064

    Try to switch PD4ML into debug mode with pd4ml.enableDebugInfo() and inspect STDOUT/server’s log which URL it actually tries to load.

    If in your HTML document references are defined as /path/to/stylesheet.css and in the debug output they appear prefixed with file:, pd4ml.useServletContext() call should help.

    But it is a better idea to reference CSS stylesheets with relative paths (like ../mycss/stylesheet.css).

    in reply to: how to set logo in Pdf First page only
    in reply to: pdf to png
    #27874

    PD4ML does not support headers and footers output.

    As a workaround, try to print logo.gif to the graphics device of the buffered image object after PD4ML printed the main content of the document there.

    in reply to: Can pd4ml follow HTML links and merge it to one pdf?
    #27870

    For the time being the feature is not supported.

    However PD4ML implements a proprietary tag, which could help to achieve the needed result.

    Currently the tag is undocumented and we use it only in DXL->PDF conversion scenarios. I am afraid the tag has some limitations – I need to check.

    But the idea is as follows: you may add a sequence of tags at the end of the main document:
    [language=xml:1hm0omug]

    [/language:1hm0omug]
    The tags will be ignored by the browsers, but PD4ML will include the referenced documents. Of course, in forthcomming versions, we could automate the process and to implicitly build the list from tags.

    in reply to: General questions / FAQ
    #26406

    Hi PD4ML
    when i am trying in Adobe Reader version4.0 i am not get some images in side my pdf page but, I had seen images in Adobe version 7.x. why i couldn’t see in version4.x? how can i see in Version 4.x

    Thanks in Advance
    Regards
    Dinesh.N

Viewing 15 posts - 676 through 690 (of 4,234 total)