Forum Replies Created

Viewing 15 posts - 976 through 990 (of 4,234 total)
  • Author
    Posts
  • in reply to: HTML/CSS rendering issues
    #26481

    I am trying to set the page insets on my page using the pageInsets attribute within the ‘transform’ tag.

    When I set the page insets using the java API call everything works fine:
    pd4ml.setPageInsetsMM(new java.awt.Insets(topInset, leftInset, bottomInset, rightInset));

    However when I comment out the java code and try to use the attribute in the JSP, it is ignored.

    Here’s a sample of my code for the JSP markup:




    thanks for any help
    Michael

    in reply to: PD4ML Tips & Tricks
    #26482

    Hi, I want to center the text in my result *.pdf in wich i’m using ‘fitPageVertically’ to fit it, but it’s impossible to me. There is anyway to do that? everytime that i do that the text go to the left.

    Thank you for all and sorry for my english.

    in reply to: General questions / FAQ
    #26483

    The PDF file is created with PD4ML try version 361B2 and is in landscape layout.

    Is there any PD4ML/PDF api that can be used to instruct the printer to print a pdf file in landscape layout automatically without manually selecting the landscape in the printer dialog?

    Thanks
    Tom

    in reply to: General questions / FAQ
    #26484

    I am evaluating the PD4ML for our project.

    The dynamically generated JFreeChart image could not be loaded.
    The static images are loaded and converted in the PDF file.

    The MyChart servlet generates JPENG format image on the fly.
    The generated image can be loaded to the browser with
    URL http://localhost:11000/MyWeb/MyChart.

    When rendering the HTML page to PDF, the following are the error message:

    image not yet in cache: http://localhost:11000/MyWeb/MyChart
    not yet in cache: http://localhost:11000/MyWeb/MyChart
    resource http://localhost:11000/MyWeb/MyChart not found.
    image http://localhost:11000/MyWeb/MyChart not found.
    can not load image: http://localhost:11000/MyWeb/MyChart

    We tried to use useServletContext and it did not work either.

    in reply to: HTML/CSS rendering issues
    #26485

    I have a webapp that uses JSPs to display “user forms”. I’m using PD4ML to convert these “user forms” to PDF files very similar to the example “PD4ML API calls in your Java application”. This works most of the time, but sometimes PD4ML just generates a blank PDF.

    I can even use the pd4ml.jar GUI app and paste in the (production) URL of a problem form and it simply generates a blank page each time. However, when I save the HTML that is a result of the JSP to a file and load it, the PDF generates fine.

    Is there some way to debug the GUI app to help me see what’s wrong with my JSP, and where does the output go?

    Thanks in advance,
    tkofford@ku.edu

    in reply to: PD4ML failed to load Servlet Dynamically generated JPG File
    #28303

    I am haviing a similar issue. I am tryeing to load images served by a servlet….this is what i see…

    image not yet in cache: http://localhost:8080/tb/image/loadByFileName.htm?fileName=2009_4R30.jpg&method=getFromDb&type=2&id=1000086
    not yet in cache: http://localhost:8080/tb/image/loadByFileName.htm?fileName=2009_4R30.jpg&method=getFromDb&type=2&id=1000086
    image size: 2644
    image type of http://localhost:8080/tb/image/loadByFileName.htm?fileName=2009_4R30.jpg&method=getFromDb&type=2&id=1000086 is unknown.
    can not load image: /tb/image/loadByFileName.htm?fileName=2009_4R30.jpg&method=getFromDb&type=2&id=1000086
    done in 1305ms.

    in reply to: General questions / FAQ
    #26486

    Hi

    I need to include images and charts in my PDFs which are retrieved from a server that requires authentication.

    The server is actually the same server as the one where the PDF generator is running, so the references to the images are relative and all the required authentication information is in the header of the initial request.

    How do I include this header information in the requests for the images ?

    Basically I think I need something like the PD4ML.setCookie() method, but for headers.

    PD4ML.useHttpRequest() looked promising, but it doesn’t solve my problem.

    Thanks for your help.
    Simon

    in reply to: General questions / FAQ
    #26487

    Hi everybody,

    I’m trying PD4ML library and i have a few questions (I dont find answers during my tests and in the documentation) :

    1. Could I handle events whenever PD4ML creates a new page?
    for exemple :
    – Could I create a margin-left at each uneven page and a margin-right at each even page ?
    – Could I avoid orphan ?

    2. When I create a table of contents, how can I refered the title to his pagenumber ?

    Thank you !

    in reply to: A few questions about PD4ML
    #28318

    > 1. Could I handle events whenever PD4ML creates a new page?

    No.

    > – Could I create a margin-left at each uneven page and a margin-right at each even page ?

    We call the feature “mirrored margins”, it is in our TODO list, and it is going to be available with forthcoming versions.

    > – Could I avoid orphan ?

    you may achieve that with a conditional page breaks

    placed before paragraphs, or by “page-break-inside: avoid” CSS style applied to paragraph portions.

    > 2. When I create a table of contents, how can I refered the title to his pagenumber ?

    generates a table of contents from H1-h6 hierarchy with correct references and page numbers.

    Page numbering info is known on the very late phases of PDF output, so there is no reasonable way to implement, for example, placeholders for page numbers in main HTML body.

    in reply to: Passing authentication headers
    #28312

    PD4ML.setCookie() and PD4ML.useHttpRequest() is the right direction to solve the issue.

    Does your application use JSESSIONID cookie to identify a session? If so, what do you pass to PD4ML.setCookie() as a parameter?

    in reply to: Passing authentication headers
    #28313

    OK, a little more information about our environment.

    We have Tivoli Access Manager (TAM) in front of Day Communique (CQ). TAM handles authentication, it validates login details and then sets a trusted header in the request that’s forwarded to CQ. If the header is set, CQ checks it matches a user account in that system and applies its own authorisation before serving the requested page.

    The page doing the PDF generation resides on the CQ server, as do the images and chart servlet that I reference in the HTML I want to use to generate PDF.

    The URLs in the HTML address the CQ server such that requests bypass TAM.

    For this to work, the HTTP header containing the user authentication information needs to be included in the request that PD4ML makes to retrieve the images.

    We don’t use JSESSIONID or cookies to identify the user to CQ, only .

    Regards
    Simon

    in reply to: Debug – Blank Page Rendered from JSP?
    #28309

    Please save a blank PDF and send it to support pd4ml com. First we are going to check if the problem is caused by a wrongly applied character set conversion to a binary PDF data.

    in reply to: Passing authentication headers
    #28314

    In regular non-PDF scenario, the image requests are initiated by a web browser after the main HTML page is loaded. So I do not think it uses any proprietary HTTP headers to identify a user/session. I would expect a very standard session ID propagation – via cookie (in HTTP header) or via URL string.

    Try to dump HTTP headers (there are browser plugins or other tools for that) and determine the way it identifies a session.

    in reply to: A few questions about PD4ML
    #28319

    Thank you for the answer !

    I’ll try to avoid orphan and the TOC. And I’ll wait for the “mirrored margins” 🙂

    in reply to: Passing authentication headers
    #28315

    In the regular non-PDF scenario you describe, consider when the site serving the HTML and images is protected using Basic Authentication. In that scenario after you’ve logged in to get the main HTML page, each request for the images contain the Authorization header with a value such as “Basic c2ltb246c2ltb24=”. It doesn’t use sessionids or cookies to identify the user.

    In our scenario the Tivoli proxy in front of our application server adds the iv_user header to requests that are forwarded to the application server. The application server looks for that header to identify the user.

    To get this to work with Flying Saucer / xhtmlrenderer I wrote a custom UserAgentCallBack which copied the request header from the initial request through to those being used to generate the PDF. This solved the authentication problem for both Basic Auth (as we have in our development environment) and for the custom Tivoli header we have in our production environment.

    Is there a way to do something similar with PD4ML ?

    Or, preferably, can PD4ML.useHttpRequest() be made to read the headers in the HTTP request provided and use them in requests being made by PD4ML to generate the PDF?

    Regards
    Simon

Viewing 15 posts - 976 through 990 (of 4,234 total)