cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Image Tables - ePub

rarmstrong
1-Newbie

Image Tables - ePub

Hi Folks,

I have one other question related to ePub's. Has anyone else got any ideas of how best to convert tables to Images when publishing to ePub?

We find that HTML rendered tables are useless when rendering to ePub as many readers just crunch the column size really narrow. To date we have found the best thing for end users is to have table images which would allow them to scroll sideways.

What do others do in this scenario and if you have used image tables, how have you rendered these on-the-fly?

Thanks,

Rob.

1 ACCEPTED SOLUTION

Accepted Solutions

I like Clay's suggestion. If you are forced to go with table images then you will have to create some custom routine to typeset them and "print to GIF" (or whatever format is required). You can't just stick them into a paginated document and screenshot because then you have page breaks to worry about. We have done something similar for other customers but it involves customisation work.

View solution in original post

7 REPLIES 7

Hi Rob--

Have you tried setting your table width to be an absolute width (e.g. 6in) instead of proportional or just 100% of view width? I guess it would depend on the epub viewer, but I would expect a well-behaved epub viewer to do the right thing with that, i.e. display the table with a fixed width, using horizontal scroll bars if necessary.

--Clay

Thanks Clay Helberg‌ for the suggestion.

I spoke with our eReader expert, and while a fixed table would work in theory - I believe our issue is our eReader doesn't support scrolling on some of our platforms currently.

Perhaps sometime in the future this will become possible.

Thanks,
Rob.

I like Clay's suggestion. If you are forced to go with table images then you will have to create some custom routine to typeset them and "print to GIF" (or whatever format is required). You can't just stick them into a paginated document and screenshot because then you have page breaks to worry about. We have done something similar for other customers but it involves customisation work.

Thanks Gareth Oakes‌,

We were thinking a similar solution - I am curious if different people have had experience with rendering tables as images and what tools they may have used in past and were successful using.

I am aware of an open source project (where the name escapes me right now). Are there other products that will do this?

Thanks,

Rob.

We have achieved this with PE using Styler (APP) code. I guess if you didn't care too much how the tables looked you could get away with XSL-FO, PhantomJS, PrinceXML?

rdiaz
5-Regular Member
(To:rarmstrong)

Hi Rob,

Could you let the community know how this ended up?

Did you get the resolution to your liking?

Thanks!

There are a couple of open source projects that allow you to convert HTML to image or to SVG. So we have ended up having to use this as a method to convert the tables during our publish cycle.

This isn't ideal as the resulting table isn't quite as nice looking, however it works in most cases.

Ideally, Styler would allow this type of setting in the style sheet to indicate that a table should be rendered to an image for the resulting HTML or ePub format. It would at least retain the higher quality look and feel that the PDF's provide.

We are in the midst of development, but this is the way we are going.

Thanks to everyone for their suggestions,
Rob.

Top Tags