HTML to PDF / DOCX / RTF Java converter library › Forums › PD4ML v3 Archived Forums (Read Only) › HTML/CSS rendering issues › Problem with output ledger type PDF Width › Re: Re: Problem with output ledger type PDF Width
Thanks for you reply..
Now i removed pd4ml.adjustHtmlWidth() call. Yes you are right. I need to fill a single page horizontally and vertically with the document content. In the attached output pdf in my previous thread you can see content is not expanding to the right.
Also i couldnot understand this ByteArrayOutputStream . I could only get output pdf if i use fileoutputstream object.
I hope you understood the problem iam facing. Vertically it is coming fine. When it comes to horizontally content is not expanding 100%.
Could you please suggest me code to use ByteArrayoutputstream .
As of now this is my current code..
java.io.FileOutputStream fos = new java.io.FileOutputStream(“C:/ouputPdf.pdf”);
PD4ML pd4ml = new PD4ML();
pd4ml.fitPageVertically();
pd4ml.setPageSize(pd4ml.changePageOrientation(PD4Constants.LEDGER));
pd4ml.render(“file:” + inputHTMLFileName, fos );