Forum Replies Created

Viewing 15 posts - 841 through 855 (of 4,246 total)
  • Author
    Posts
  • in reply to: body background-color vs. background-image
    #28189

    I´d like to thank you, for the quick answer. It works perfect. 🙂
    <br /> public class Pd4Php {<br /> <br /> private String image_url;<br /> public static void main(String[] args) throws Exception {<br /> ...<br /> Pd4Php converter = new Pd4Php();<br /> converter.generatePDF( args[0], args[1], args[2], args[3], args.length > 4 ? args[4] : null );<br /> // give an additional argument to the command line<br /> }<br /> private void generatePDF(String inputUrl, String htmlWidth, String pageFormat, String fontsDir, String imageUrl)<br /> { // an additional String imageUrl<br /> if(imageUrl != null)<br /> {<br /> PD4PageMark footer = new PD4PageMark();<br /> footer.setPageBackgroundImageUrl(imageUrl);<br /> pd4ml.setPageFooter(footer);<br /> }<br /> }<br />
    In your PHP Code you need to add the following:
    <br /> passthru('java -Xmx512m -Djava.awt.headless=true -cp .:pd4ml_demo.jar Pd4Php '' . $_POST .<br /> '' 800 A4 $_POST 2>&1');<br />

    in reply to: PD4ML multicolumn functionality does not support Arabic RTL
    #28095

    Please send source HTML and resulting PDF samples to support pd4ml com

    in reply to: Does Not Find New Fonts
    #27926

    Try turning on PD4ML debugging and you should be able to see the TTFs loading in the logs. To see the debugging, you may need to restart your application server. There are some default CSS styles like “simsum” for Chinese that you could map in your pd4fonts.properties file (part of the font substitution functionality, I believe).

    in reply to: Troubleshooting
    #26446

    Hi

    We have an architecture with apache tomcat and tomcat have to pass through a proxy.

    In developpement environnement with only tomcat everythning works fine. In validation environement with Apache and proxy it doesn’t work.

    When we use P4ML.render with a array of url, we have noting displayed in the pdf.

    When we use HttpClient (code below), the html works but we don’t have the images.

    HttpState initialState = new HttpState();

    // Initial set of cookies can be retrieved from persistent
    // storage
    // and re-created, using a persistence mechanism of choice,
    Cookie mycookie = new Cookie(u.getHost(), “JSESSIONID”, sessionId, “/”, null, false);

    // and then added to your HTTP state instance
    initialState.addCookie(mycookie);

    // Get HTTP client instance
    HttpClient httpclient = new HttpClient();
    //httpclient.getHostConfiguration().setProxyHost(new ProxyHost(“dmz-proxy”,8888));
    httpclient.getHttpConnectionManager().getParams().setConnectionTimeout(300);
    httpclient.setState(initialState);

    // RFC 2101 cookie management spec is used per default
    // to parse, validate, format & match cookies
    httpclient.getParams().setCookiePolicy(CookiePolicy.BROWSER_COMPATIBILITY);

    // Get HTTP GET method
    GetMethod httpget = new GetMethod(strURL);
    httpget.setFollowRedirects(true);

    // Execute HTTP GET
    int result = httpclient.executeMethod(httpget);

    charset =httpget.getResponseCharSet();
    string.append(new String(httpget.getResponseBody(), charset));

    Can you correct the problem and use httpclient for your connections ?

    Regards

    Kefah & Jean-Paul

    in reply to: HTML/CSS rendering issues
    #26447

    Hi All
    I am trying to use pd4ml and when i include some basic streams which contain say a text area, pd4ml seems to be trying to fetch a resource (image) with the path resourcesiconsarrow-up.gif and arrow-dn.gif which i believe is in the pd4ml source jar.
    But somehow it is unable to find this and then it makes a fall back to the getResourceAsBytes method defined in a class in my application that extends ResourceProvider in pd4ml and that tries to fetch resources from the static content of my system/application. Have the same problem with some other controls like checkbox etc which are all failing to find images like spacer.gif, cb-off-big.gig all part of pd4ml.
    Is there something i am missing

    in reply to: HTML/CSS rendering issues
    #26286

    I am having a sporadic problem with a nullPointerException when rendering some pages. I have an application where html is stored in a database and then retrieved and rendered by pd4ml. I am not sure what html is causing the problem because we have thousands of users, and I am not sure which one is causing the error. I will try to find out more information, but here is the error just in case someone can tell right away – thanks!

    BlockElement(p) {display=block, margin-left=0, margin-top=0, margin-bottom=scale (100001.171875), margin-right=0}
    ContentElement(pd4content) [ ] {display=block, line-height=1.2000000476837158}

    java.lang.NullPointerException
    at java.lang.String.indexOf(String.java(Compiled Code))
    at org.zefer.cache.d.getResourceAsBytes(Unknown Source)
    at org.zefer.cache.g.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.n.thisvoid(Unknown Source)
    at org.zefer.html.doc.n.Õõ0000(Unknown Source)
    at org.zefer.html.doc.n.if(Unknown Source)
    at org.zefer.html.doc.b.b.super(Unknown Source)
    at org.zefer.html.doc.ab.o00000(Unknown Source)
    at org.zefer.html.doc.b.d.super(Unknown Source)
    at org.zefer.html.doc.ab.o00000(Unknown Source)
    at org.zefer.html.doc.p.o00000(Unknown Source)
    at org.zefer.html.doc.p.ÔØ0000(Unknown Source)
    at org.zefer.html.doc.m.new(Unknown Source)
    at org.zefer.html.doc.m.o00000(Unknown Source)
    at org.zefer.html.doc.b.d.super(Unknown Source)
    at org.zefer.html.doc.ab.o00000(Unknown Source)
    at org.zefer.html.doc.b.d.super(Unknown Source)
    at org.zefer.html.doc.ab.o00000(Unknown Source)
    at org.zefer.html.doc.Document.layout(Unknown Source)
    at org.zefer.pd4ml.PD4ML.super(Unknown Source)
    at org.zefer.pd4ml.PD4ML.render(Unknown Source)
    at org.zefer.pd4ml.PD4ML.render(Unknown Source)
    at org.zefer.pd4ml.PD4ML.render(Unknown Source)
    at org.zefer.pd4ml.taglib.PD4MLTransformerTag.render(Unknown Source)
    at org.zefer.pd4ml.taglib.PD4MLTransformerTag.doEndTag(Unknown Source)
    at _pd4ml._jspService(_pd4ml.java:588)

    in reply to: [.NET] HTML rendering problem
    #28142

    Sorry, I completely forgot to reply.

    Thanks for sending the files.
    It is working now as expected.
    Great work, thank you.

    Is this version already available for purchase?

    Best regards,
    Stefan

    in reply to: [.NET] HTML rendering problem
    #28143

    > Is this version already available for purchase?

    It is not available for download yet, but we are ready to send it to you directly by request.

    in reply to: nullPointerException when rendering page
    #27615

    Please give a try to PD4ML v361b1
    As far as I remember we addressed a similar issue (caused by image parsing in order to determine its type).

    in reply to: PD4ML.render proxy issue
    #28191

    Try to propagate session ID with PD4ML requests. There is an API call intended for that:

    pd4ml.setCookie( “JSESSIONID”, cookieValue );

    where cookieValue is something like that: “9034657927465;path=/”

    in reply to: PD4ML.render proxy issue
    #28190

    Hi,

    Thanks for your response.
    But it is not a cookie problem, we have no problem with the session. The problem is for pd4ml to go through our proxy.

    best regards,

    in reply to: PD4ML.render proxy issue
    #28192

    You may specify proxy server address an port with the standard way for Java applications – usin http.proxyServer and http.proxyPort environment variables.

    in reply to: General questions / FAQ
    #26449

    Hi, PD4ML works great and I’ve successfully integrated it into my weblogic instance in a multi-threaded environment to perform real-time HTML to PDF conversion for archival purposes. I created a custom resource provider based on the article in this forum. My custom resource provider uses Java’s JAI to reencode images on the fly so JPGs can be compressed and the PDF size reduced. This is working well, but I have encountered one issue with using a custom resource provider.

    In my weblogic instance, PD4ML seems to be dynamically loading my custom resource provider through the root classloader. My project consists of an ear, that is packed with several wars and jars. But the custom class is defined within a war within an ear. PD4ML only finds it when I take my custom class and its dependencies and put them in a separate jar on the server classpath, so PD4ML can load it with the root classloader.

    That works, but it limits the resource provider’s integration with other project-specific classes that I would like to use such as loggers and custom property file readers, which are not accessible to the root classloader.

    Is it possible to have PD4ML use a classloader for my custom resource provider other than the root classloader? Can it dynamically load my class through a classloader that I define? Can I add that as another property to the dynamic map?

    As well, is there a published list of properties that can be added to the map?

    Much thanks for a great app!

    in reply to: Is it possible to toggle multicolumn from page to page
    #28049

    Unfortunately the feature is not supported.

    If multicolumn is needed for a single page only, you may play with undocumented [language=xml:342opcph]content[/language:342opcph]
    It “understands” the following attributes (numbers are default values):

    maxcols=4
    colspacing=20
    scalelimit=0.75
    scalestep=0.02
    width
    height

    The purpose of the tag is to try to fit given nested content into a box, limited by height/width. It scales the content down till scalelimit. If a single column is not sufficient for the content, it tries to layout into 2 columns etc.

    in reply to: Black screen in pdf
    #28185

    The newest development build addresses the issue. Please contact support pd4ml com for the trial version.

Viewing 15 posts - 841 through 855 (of 4,246 total)