Welcome Guest Search | Active Topics | Sign In | Register

Using HtmlToPdf.ConvertUrl to Convert Page with a Text Area or Scrollable DIV Options
Martin
Posted: Wednesday, June 12, 2013 6:41:05 AM
Rank: Newbie
Groups: Member

Joined: 6/12/2013
Posts: 4
I'm currently evaluating EO.Pdf for .NET.
I have an ASP.NET web page that has a TEXTAREA (ASP.NET Multiline TextBox) on it. On rendering to a PDF document the TEXTAREA is rendered with a scroll bar, but it appears disabled, so you cannot scroll to see the rest of the text. Is this a limitation of the .NET object or a limitation of PDF documents?
I have also tried rendering the page with a scrollable DIV, this renders similarly.
eo_support
Posted: Wednesday, June 12, 2013 10:13:09 AM
Rank: Administration
Groups: Administration

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

That's normal. The PDF file is a static "snapshot" of your page --- consider a PDF page as a piece of paper in your printer. It does not contain any interactive features except for links.

It is not technically possible to support all interactive feature of an HTML page in a PDF file. For example, some interactive feature are implemented by JavaScript (such as a Menu). In this case it's not technically possible to support the menu in the PDF file because a PDF viewer does not have the equivalent JavaScript engine and the corresponding DOM objects (such as window, body, etc). As such, in order to support all interfactive features on an HTML page, you need a browser ---- that's exactly what a browser is for. When you render a HTML page to a PDF file, it captures a snapshot of the rendered page and keeps what PDF file can do such as links.

In your case, you will want to render the whole text as just text when you export to PDF. This is very similar to many web page has a "Printer Friendly Version". You can modify your code to check whether you are performing a PDF conversion so that it generates slightly different HTML elements in that case.

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.