Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • in reply to: problem changing orientation with tomcat
    #28782

    That would be a little hard to do, since the table is quite complicated and dynamic…

    but thanks.

    in reply to: problem changing orientation with tomcat
    #28780

    Preheps there’s a chance to split the html table to two different parts easily?

    The problem is that,when the table is too large,we loose information this way.

    Thanks ahead…

    in reply to: problem changing orientation with tomcat
    #28778

    ok.

    Here is a the pdf. it’s orientation suppose to be ‘landscape’.

    (The code seems to ignore the html definitions in the transform tag..)

    in reply to: problem changing orientation with tomcat
    #28776

    anyone??

    please?

    I cannot progress unless I solve this issue.

    Thanks ahead for the replies…

    p.s:

    I used the following code, tring to get landscape orientation while converting html files to pdf:

    “

    <%@ taglib uri="https://pd4ml.com/tlds/pd4ml/2.6" prefix="pd4ml" %> <%@ taglib uri="https://pd4ml.com/tlds/pd4ml/2.6" prefix="pd4ml" %><%@page
    contentType="text/html; charset=ISO8859_1"%><pd4ml:transform
    
    
    
    pageFormat="A4"
    
    pageOrientation="landscape"
    
    pageInsets="100,100,100,100,points"
    
    enableImageSplit="false">
    
    
    
    <pd4ml:transform
    
    
    
    <html>
    <head>
    …”

    and

    ”

    private static void generatePDF(String inputHTMLFileName, File outputPDFFile, Dimension2D format, String fontsDir, String headerBody)
    throws Exception {
    
    java.io.FileOutputStream fos = new java.io.FileOutputStream(outputPDFFile);
    PD4ML pd4ml = new PD4ML();
    pd4ml.setPageInsets(new Insets(0, 0, 0, 0));
    pd4ml.setHtmlWidth(1600);
    pd4ml.setPageSize(pd4ml.changePageOrientation((Dimension)format)); // landscape page orientation
    if ( fontsDir != null && fontsDir.length() > 0 ) {
    pd4ml.useTTF( fontsDir, true );
    }
    if ( headerBody != null && headerBody.length() > 0 ) {
    PD4PageMark header = new PD4PageMark();
    header.setAreaHeight( -1 ); // autocompute
    header.setHtmlTemplate( headerBody ); // autocompute
    pd4ml.setPageHeader( header );
    }
    pd4ml.enableDebugInfo();
    pd4ml.render("file:" + inputHTMLFileName, fos);
    }
    
    public  static void doPDFConvertion(String htmlPath,String outputFile)
    {
    
    String htmlFileName =htmlPath;
    File pdfFile = new File(outputFile);
    
    try
    {
    generatePDF(htmlFileName, pdfFile, (Dimension2D)PD4Constants.A4,  null, null );
    }
    catch(Exception e)
    {
    int i=0;
    }
    System.out.println("done.");
    }

    ”

    Thanks ahead…

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