PDF Generating Tool Support Forum

HOME   Login   Register    Search




  Subject: Incorrect layout in generated PDF
   PostPosted: 23 Apr 2010, 00:53 
I cannot get my generated PDF file to have two columns like my HTML does.

I have tried setting the HtmlWidth and PageSize, but those just seem to make the pdf page bigger, but it still wants to put the text column under the image instead of next to it.

Here is a snip of my code:

os = new java.io.FileOutputStream(file);

PD4ML pdf = new PD4ML();
pdf.setPageSize( new Dimension(1024, 1024));
pdf.setPageInsets( new Insets(0, 0, 0, 0) );
pdf.setHtmlWidth( 1024 );
pdf.adjustHtmlWidth();
pdf.enableImgSplit( false );
pdf.render( new StringReader(html), os );
os.close();

I have tried leaving out the call to adjustHtmlWidth and even making the Html and PageSize really large. No dice.

Any help?


Attachments:
File comment: HTML file from which PDF is generated
test.html.zip [1.31 KiB]
Downloaded 71 times
File comment: PDF File generated
2JXN13TH.pdf [62.82 KiB]
Downloaded 77 times
  Subject: Re: Incorrect layout in generated PDF
   PostPosted: 26 Apr 2010, 18:33 
The width of the nesting DIV is not sufficient for 2 columns.
I changed the width from 612 to 624 and it produced a 2 columns layout.

#clientBrowserMainEntity {
	float:left;
	width:624px;
	margin: 0 0 10px 5px; }


  Subject: Re: Incorrect layout in generated PDF
   PostPosted: 16 Jul 2010, 23:35 
Thanks. I was sure I had tried that, but I guess I must not have.


Last bumped by Anonymous on 16 Jul 2010, 23:35.



[Reply]     [ 3 posts ] 

cron
Copyright ©2004-10 zefer|org. All rights reserved. Bookmark and Share