Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #26461

    I was just wondering if and how it is possible to have A4 pages print to the PDF side by side (2 per line) instead of it being singular A4 pages scrolling downwards? Is this something that can be added into the header of my JSP layout?

    #28225

    PD4ML defined the following rendering switch:

    /**
    * "pd4ml.document.view.mode" defines default view mode for generated document, one from:
    * "SinglePage", "OneColumn", "TwoColumnLeft", "TwoColumnRight", "TwoPageLeft", "TwoPageRight";
    * @see PD4ML#setDynamicParams(java.util.Map)
    */
    public static final String PD4ML_DOCUMENT_VIEW_MODE = "pd4ml.document.view.mode";

    In Java it can be defined with the code:

    Map m = new HashMap();
    m.put(PD4Constants.PD4ML_DOCUMENT_VIEW_MODE, "TwoColumnLeft");
    pd4ml.setDynamicParams(m);

    PD4ML JSP custom tags do the same that way:

    <pd4ml:parameters>
    <pd4ml:parameter key="pd4ml.document.view.mode" value="TwoColumnLeft"/>
    </pd4ml:parameters>

    #28226

    Thank you for your reply, I tried adding the JSP part to my JSP template however it created an error, should it of worked with only updating the JSP and none of the other parts? This is what my head tag looks like;

    <head>
    
    <pd4ml:fix_base_path pattern="/site" basePath="http://<c:out value='${company.domain}'/>" />

    <pd4ml:parameters>
    <pd4ml:parameter key="pd4ml.document.view.mode" value="TwoColumnLeft"/>
    </pd4ml:parameters>

    <title><c:out value='${company.name}'/> - <tiles:getAsString name="title"/></title>
    
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15" />
    <link rel="stylesheet" href="http://<c:out value='${company.domain}' />/site/custom/michelleHarvey/css/particularsPDF.css" type="text/css" media="screen" />
    
    </head>
    
    <body>

    Should it simply just work like that?

    I also have another question, along the lines of what I am trying to achieve which is to get something printing A3 landscape yet with a column which flows onto the right hand side of the A3 page from the left hand side, is this possible, or does it need to be done in the way I am already thinking which is to have the seperate A4 pages next to each other in the PDF?

    Many thanks, Lee (lee@domus.net)

Viewing 3 posts - 1 through 3 (of 3 total)

The forum ‘HTML/CSS rendering issues’ is closed to new topics and replies.