pd4ml使html转pdf时字体怎么换行?

当使用pd4ml技术让html转pdf时,大文本标签(textarea)转成pdf,文本全部展示在一行,各位使用过的大神,看看这个怎么解决。难道没人遇到过?

图片说明

你是想自动换行,一般设置页面大小和页面边距就可以了

protected int topValue = 10;  
protected int leftValue = 20;  
protected int rightValue = 10;  
protected int bottomValue = 10;  
protected int userSpaceWidth = 1300;  

PD4ML pd4ml = new PD4ML();  

    pd4ml.setHtmlWidth(userSpaceWidth); // set frame width of "virtual web browser"  

            pd4ml.setPageSize(pd4ml.changePageOrientation(PD4Constants.A4));   

    // define PDF page margins  
    pd4ml.setPageInsetsMM(new Insets(topValue, leftValue, bottomValue, rightValue));   

![图片说明](https://img-ask.csdn.net/upload/201606/14/1465866344_849758.png)图片说明