Forum Replies Created

Viewing 15 posts - 1,096 through 1,110 (of 4,243 total)
  • Author
    Posts
  • in reply to: Looking For PD4ML.NET Serve side Header/Footer Display Code
    #28414

    Nope. It used to work before I added the footer code you have provided me. Thank you.

    in reply to: Looking For PD4ML.NET Serve side Header/Footer Display Code
    #28415

    If I remove the footer code which is above the render page, the link is working as is. It is not giving me any error details.

    All the code currently I am using in my application is posted in one of my previous posts.

    Thank you
    VA

    in reply to: HTML/CSS rendering issues
    #26520

    My problem is that when i convert the html to pdf i found one page correctly and other two empty white pages. why?

    in reply to: initialPageNumber
    #28392

    Hello pd4ml-team,

    I just would like to know, what the status is on the initialPageNumber parameter.
    We are about to deploy the solution for our customer, so it would be really great to have this feature already in place for the customer (We will buy the license soon).

    Thank you for your help!

    Kind regards
    Niels Göran Blume

    in reply to: HTML5 Canvas – Anyone working on such a thing for PD4ML?
    #28381

    Steve, we implemented the first version of the feature. It is not available for download yet, so please contact support pd4ml com

    Now PD4ML checks if there is PD4CanvasHandler class available in the classpath and invokes its getImage() method for each tag occurrence.

    Below is a dummy implementation of the handler class.

    [language=java:hg0efl8i]import java.awt.Color;
    import java.awt.Graphics;
    import java.awt.image.BufferedImage;
    import java.io.ByteArrayOutputStream;
    import java.util.HashMap;
    import java.util.Iterator;
    import java.util.Vector;

    import javax.imageio.IIOImage;
    import javax.imageio.ImageIO;
    import javax.imageio.ImageWriteParam;
    import javax.imageio.ImageWriter;
    import javax.imageio.stream.MemoryCacheImageOutputStream;

    import org.zefer.cache.DynamicImageHandler;

    public class PD4CanvasHandler extends DynamicImageHandler
    {
    public byte[] getImage(String tagName, int width, int height, String id, HashMap attributes, String onBodyLoad, Vector scriptSections) throws Exception {

    System.out.println(“canvas ID: ” + id);
    System.out.println(“onBodyLoad: ” + onBodyLoad);
    System.out.println(“attributes: ” + attributes);

    if (scriptSections != null) {
    Iterator ii = scriptSections.iterator();
    while (ii.hasNext()) {
    String js = (String)ii.next();
    System.out.println(”


    “);
    System.out.println( js );
    }
    }
    System.out.println(”


    “);

    BufferedImage bi = new BufferedImage(width, height, BufferedImage.TYPE_BYTE_INDEXED);
    Graphics g = bi.getGraphics();

    g.setColor( Color.white );
    g.fillRect(0, 0, width, height);
    g.setColor( Color.red );
    g.drawString(“Canvas handler test”, 30, 30);
    g.dispose();

    Iterator iter = ImageIO.getImageWritersByFormatName(“png”);
    ImageWriter writer = (ImageWriter)iter.next();
    ImageWriteParam iwp = writer.getDefaultWriteParam();

    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    MemoryCacheImageOutputStream output = new MemoryCacheImageOutputStream(baos);
    writer.setOutput(output);
    IIOImage image = new IIOImage(bi, null, null);
    writer.write(null, image, iwp);
    writer.dispose();

    return baos.toByteArray();
    }
    }[/language:hg0efl8i]

    If your idea with RhinoCanvas works, we’ll add a new method to make possible a canvas output in vector form.

    For the time being PD4ML parser is not able to read tags. It needs explicit opening and closing tags: and

    in reply to: Problem. 1 page correctly and 2 empty white pages.
    #28429

    It is difficult to say without an HTML sample.

    A typical reason – trailing white spaces at the end of the document. Try to add

    BODY { border: 1 solid red }

    CSS style to visualize the actual document content edges. Also make sure there is no explicit page break directives.

    in reply to: Looking For PD4ML.NET Serve side Header/Footer Display Code
    #28416

    There is a new PD4ML.NET version available for download. Please check if it solves the issue.

    in reply to: HTML/CSS rendering issues
    #26521

    I have many HTML documents constructed like below:
    <div ><br /> <div>div text</div><br /> <table><br /> <tr><br /> <td class="a">cell text</td><td class="a">cell text</td><br /> </tr><br /> ...<br /> </table>
    and associated CSS
    body{<br /> font-size:70%;<br /> }<br /> table {<br /> font-size:100%;<br /> }<br /> td.a {<br /> font-size:100%;<br /> }

    In HTML view (IE, FF …) both: “div text” and “cell text” have the same font-size (70%) but in generated PDF the “cell text” is bigger than the “div text”.
    Is it a bug in PD4ML or is it a feature ?
    Is the way to achieve in PDF the same result as in HTML without CSS manipulation ?

    in reply to: How to generate pdf for constrained urls
    #27600

    @PD4ML wrote:

    It depends on the server side session mechanism of you web application. You need to propagate the session ID correctly with the URL passed to PD4ML.

    For the regular J2EE application a solution is to add the jsessionid parameter to URLs:

    http://your.server.net/webapp/sourcepage.jsp;jsessionid=8764587625?param1=value1&param2=value2

    How will this work with .Net MVC. need it to render an MVC action that is based on an authentication requirement.

    in reply to: HTML/CSS rendering issues
    #26522

    Hi together,

    I try to place a footnote text at the bottom margin of a page.
    For this reason I use the footnote tag from the taglib. While it exists at the correct place in HTML, in Pdf it will be displayed two page earlier.
    If I try to implement it using a div tag positioned absolutely top/leftI get it right for one element constellation. But if the element structure changes the footnote will be anywhere maybe nowhere.
    If I place it absolutely bottom positioned the HTML will be right, but the footnote will be elsewhere but not at the desired place.
    What´s wrong? What can I do?
    Thanks
    Lutz

    in reply to: How to generate pdf for constrained urls
    #27601

    As a rule a session ID is propagated via cookies or as an URL parameter. Just check how it is in your case and invoke pd4ml.setCookie() before render() call or add the session ID to the URL string:

    http://myserver.com/(tsdfg2usdfgvrj3vxgvg)/start.aspx

    (the actual sessionID-enabled URL syntax may vary)

    in reply to: placing a footnote text o a page
    #28431

    An HTML sample and its resulting PDF would help a lot to analyze the issue. Please publish them here or send to support pd4ml com

    in reply to: initialPageNumber
    #28393

    The feature is still under development – there are some technical complexities with the implementation. In a couple of days we’ll inform you if it is going to be included to the forthcoming release.

    in reply to: General questions / FAQ
    #26523

    hello,

    how can i set the default zoom factor e.g. 100% for the pdf file? I use the command line tool to create the pdf.

    greetings

    in reply to: default zoom
    #28432

    As far as I know there is no way to pre-define in PDF initial zoom factor. You may define it as AcroRead command line/URL parameter.

    See http://partners.adobe.com/public/developer/en/acrobat/PDFOpenParameters.pdf

    In PDF file itself you may define starting document view mode. For example the code

    [language=java:3sx4er5j]Map m = new HashMap();
    m.put(PD4Constants.PD4ML_DOCUMENT_VIEW_MODE, “SinglePage”);
    pd4ml.setDynamicParams(m);[/language:3sx4er5j]

    (or
    Pd4Cmd … -param pd4ml.document.view.mode SinglePage )

    forces AcroRead to open the doc scaled down to fit viewer window.

Viewing 15 posts - 1,096 through 1,110 (of 4,243 total)