Welcome Guest Search | Active Topics | Sign In | Register

Columns for text don't flow correctly over pages Options
mkj0
Posted: Wednesday, March 2, 2016 9:45:31 AM
Rank: Newbie
Groups: Member

Joined: 11/26/2015
Posts: 4
Hi,

I have an HTML webpage that I want to export to pdf. It contains a large block of text, and uses the css options on the div above:
-webkit-column-count: 3; /* Chrome, Safari, Opera */
-moz-column-count: 3; /* Firefox */
column-count: 3;

(copied from http://www.w3schools.com/css/css3_multiple_columns.asp)

I'm using two columns, and have enough text to spread over two full A4 pages. Unfortunately, EO.pdf prints the first column from the top of the first page, onto the second. I then have to go back to the previous page to read the second column down. You can imagine the problem as I get more and more pages.

Is there a way to choose to sensibly handle columns of text that go across pages? It ought to wrap up to the top of the next column on the current page, before going on to the next page.

Thanks,

Mike
eo_support
Posted: Wednesday, March 2, 2016 10:13:30 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,229
Hi,

We do not support webkit-column or moz-column properties because PDF file has multiples pages. You will need to use multi-column settings here:

http://www.essentialobjects.com/doc/eo.pdf.htmltopdfoptions.columncount.aspx

Thanks!
mkj0
Posted: Wednesday, March 2, 2016 10:39:35 AM
Rank: Newbie
Groups: Member

Joined: 11/26/2015
Posts: 4
Hi,

Thanks for the speedy response. Unfortunately the webpages our system generates provide users the option to set columns to blocks of text, or not set it at all, hence the need for css columns. We can't set the columns on the entire document without altering what they've intended to create.

It's a pity EO.pdf can't be more sensible with columns.

Cheers,

Mike
eo_support
Posted: Wednesday, March 2, 2016 10:59:52 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,229
Hi,

There is a very limited workaround for this problem, which is to split your HTML into multiple pieces and then convert them separately by using the same PdfDocument object (make sure you call HtmlToPdf.Options.Follow in between):

http://www.essentialobjects.com/doc/pdf/htmltopdf/merge.aspx

The reason that you must set the column on the PDF converter level is because of paging, and this is exactly to avoid the problem you are running into --- the multi-column CSS has no notion of paging and when the contents are split into multiple pages, you will need to jump back and forth between pages. This is not an issue on screen but is an issue in PDF file because contents do not page on screen but they do in a PDF file. In another word, what you are asking is a paging aware multi-column CSS attribute, this does not exist in the Chromium browser engine (upon which our converter is based). In fact if you were to print the HTML directly to the printer with Chrome browser, it will turn multi-column completely off.

Hope this helps. Please feel free to let us know if you still have any questions.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.