Forum Replies Created

Viewing 15 posts - 241 through 255 (of 4,234 total)
  • Author
    Posts
  • in reply to: Troubleshooting
    #26289

    We are migrating a JSF web application from Tomcat 6.x onto IBM WebSphere 6.0 which is using pd4ml. Previously we have had no problems with this on Tomcat but now when we try and run our application on WebSphere, there is no HttpSession being passed when we try and render a PDF from a JSP page.

    The basic flow of the app is:

    • a servlet is called which then uses the render(java.net.URL url, java.io.OutputStream os) method
    • The URL points to a JSP page within the same application
    • The OutputStream is the HttpResponse output stream
    • When the page is rendered, it contains a PDF version of the JSP page.

    A basic code snippet of how we have been doing the conversion from the servlet is given below:

    <br /> ...<br /> HttpSession session = request.getSession();<br /> OutputStream output = response.getOutputStream();<br /> PD4ML pd4ml = new PD4ML();<br /> pd4ml.setCookie("JSESSIONID", session.getId());<br /> response.setContentType("application/pdf");<br /> pd4ml.render(new URL(url.toString()), output);<br />

    After this didn’t work initially I tried a few things including:

    • upgrading to the latest version of pd4ml (3.5.1)
    • calling pd4ml.setSessionId(session.getId()) *This never worked originally for some reason
    • appending “;jessionid=” + session.getId() to the end of the URL
    • appending “?pd4session=” + session.getId() to the end of the URL

    Currently the page that gets rendered does not get the HttpSession (so ends up creating a new one) and so values stored in it which are used to populate fields end up displaying as blank.

    Note that I have confirmed that a different session gets created by logging the session id both in the servlet and from the JSP page.

    Could you please advise of any known issues with integration in WebSphere or advise on passing the Session to a rendered page.

    Thanks

    in reply to: Session not transfered when using pd4ml.render()
    #27631

    Does it mean

    1. render() cannot load the URL, respecting a given ;jsessionid= or

    2. it loads the main URL correctly, but the session ID is not propagated to the referenced resources (CSS, images etc)?

    in reply to: <pd4ml:page.header>: Header Height
    #27626

    We try to specify the header directly within the HTML-file. We use …HEADER_CODE… to define it.
    Since the Header_code could get larger, it simply gets truncated at a certain height of the header. Giving a height attribut to the -Tag, has no effect on that behaviour and seems to be ignored.

    When we tried to change the header-heigt within the Java-API it also had no effect. Couldt it be that the settings inside the API get useless when inside of the HTML to be converted another -Tag is used?

    in reply to: Session not transfered when using pd4ml.render()
    #27632

    The issue is 1. render() cannot load the URL.

    The page is rendered however fields populated by values stored in the jsession are blank.

    in reply to: Any way to repeat table headers?
    #27609

    We tried enableTableBreaks(true) in the API, but it had no effect on the

    -Table-Headers. Our table-headers looks something like: SOME_COLUMN_HEADER_TEXT


    Is there something we have to change to make the table-headers repeated on each page?

    in reply to: Any way to repeat table headers?
    #27610

    PD4ML does not support

    tag. Table header for PD4ML is the top row (or rows), consists of

    only:

    [language=xml:2y987c4x]


    Column caption 1 Column caption 1
    Still table header
    Data 1 Data 2

    [/language:2y987c4x]

    in reply to: Session not transfered when using pd4ml.render()
    #27633

    Just to confirm above statement:

    The page we are trying to display contained in URL is rendered correctly using the render() method. All CSS, images, HTML etc are rendered correctly as per normal. The jsessionid however is not being transferred to the page used in the render() method.

    This means that where session values are displayed on the page, the value is showing as blank. This is because a new session is created by default in which our attributes used on the page don’t exist.

    in reply to: HTML/CSS rendering issues
    #26290

    Dear PD4ML,

    I’m having another problem with the font style override. Here’s an example to illustrate the problem
    <br /> <html><br /> <head><br /> <style><br /> .root span,p {<br /> font-family:inherit;<br /> }<br /> </style><br /> </head><br /> <br /> <body><br /> <br /> <div style='font-family:tahoma;'><br /> <P>The Secure Application Development Business Security Standard (BSS)<br /> </div><br /> <br /> </body><br /> </html><br />

    The generated PDF will use the default font family, instead of tahoma. If I switch the p and span in the style definition, then it works.
    <br /> .root p,span {<br /> font-family:inherit;<br /> }<br />

    This problem seems similar to the one described in thread html-css-to-pdf-rendering-issues-f3/font-size-x-large-t121.html

    Your kind assistance in resolving this issue will be much appreciated.

    Best regards,

    — jerry

    in reply to: HTML/CSS rendering issues
    #26291

    Hi,

    I’m using PD4ML 350 Pro/Struts/Tomcat/Windows XP.

    I’m trying to use a custom font that I’ve installed that doesen’t seem to be interpreted correctly.

    I’ve created pd4fonts.properties having just one line in it:
    [language=properties:3pzg5n0a]IDAutomationHC39M=IDAutomationHC39M.ttf[/language:3pzg5n0a]
    and placed it inside c:windowsfonts folder toghther with the ttf file.

    The problem is when setting the path to the pd4font folder for which I’ve tried numerous possibilities:
    [language=jsp:3pzg5n0a] [/language:3pzg5n0a]
    with no result.

    I’ve even tried adding font file and .properties file inside the project and specified the path to it as
    [language=jsp:3pzg5n0a][/language:3pzg5n0a]
    with same result.

    Is there anyway I can debug this to see if the the specified path is seen corectly?

    Thanks,
    Emil

    in reply to: Nested CSS definitions not rendered
    #27465

    I am trying to use adjacent selectors to size columns in a datatable. td+td works for me, but the third column, td+td+td doesn’t -I just get the td+td CSS. It displays fine in FF & IE. Is this an issue or am I doing something wrong?
    <br /> ..datatable_3col {<br /> width: 100%;<br /> background-color: #99FFFF;<br /> }<br /> .datatable_3col td, .labels td {<br /> width:200px;<br /> background-color: red;<br /> }<br /> .datatable_3col td+td, .labels td td {<br /> width:250px;<br /> background-color: yellow;<br /> }<br /> .datatable_3col td+td+td, .labels td td td{<br /> width:270px;<br /> background-color: blue;<br /> }<br />

    in reply to: Change form element images?
    #27552

    The only way is to substitute the corresponding images in pd4ml(_demo).jar

    in reply to: Page number reset
    #27598

    Unfortunately it is not possible now. I’ve added the feature request to our “TO DO” list. Please contact PD4ML support by email for the feature availability estimations.

    in reply to: Using taglib in other language than JSP or Coldfusion ?
    #27446

    > Is there a way to control page orientation and formatting without using JSP, and without forcing a page break?

    You may define the initial page format and orientation with PD4ML API calls. The defaults may be dynamically changed with

    If you do not use PD4ML API directly, but standalone command line converter it depends on the way its command line parameters are mapped to the API. For Pd4Php you may control it like that:

    passthru( ‘java -Xmx512m -Djava.awt.headless=true -cp .:pd4ml_demo.jar Pd4Php ” . $_POST . ” 800 LETTER
    -orientation LANDSCAPE
    2>>stderr.txt’ );

    in reply to: Regarding direct print through default printer & Preview
    #27461

    You may control the resulting PDF permissions with setPermissions() PD4ML API call or its JSP taglib equivalent.

    in reply to: Two questions
    #27442

    > Is it possible to change PDF Producer and Application fields in PDF while converting web page to PDF using your library

    You may override the values with “pd4ml.creator.application” and “pd4ml.producer.application” environment variables. For example with JVM command line parameter:

    -Dpd4ml.creator.application=MyApplication

    We would appreciate if you keep at least one of the fields in the resulting PDF documents with the default PD4ML value.

    > about 70% web pages look different than original

    It may sound strange, but PD4ML is not intended for web sites conversion. Modern web sites are full of dynamic content, built with Javascript, XSL, DOM etc. There is no way to support everything in Java application without a significant loss of performance.

    PD4ML implements its own HTML rendering engine, optimized for PDF output. It allows you to define PDF templates and make your applications PDF-enabled with ease using a simple markup language everybody knows – HTML.

    If you need to get perfect HTML-to-PDF web site conversion I would recommend you to use one of virtual print drivers, which capture print output and convert it to PDF on the fly. Or to use some HTML-to-PDF coverters, built on Mozilla or MS IE HTML rendering components. The soutions are good for single user usage. But if you need to create a web application with PDF output functionality, a solution based on the native HTML renderer (Mozilla or MS IE) is absolutely unacceptable: any failure in the native DLL crashes the JVM and application server. Here is the major advantage of PD4ML – it is 100% Java and any exception in it is harmless for the virtual machine itself.

Viewing 15 posts - 241 through 255 (of 4,234 total)