|
Rank: Newbie Groups: Member
Joined: 3/13/2012 Posts: 3
|
Greetings! I am starting to use your software as evaluation for a project for my company, and what I've seen so far is very impressive. I have a question concerning support for converting a chunk of HTML to PDF, and it has to do with CSS. I will have a need to convert a large chunk of HTML (which is actually a grid containing report data) to PDF, and we would like to convert the HTML as it exists on the page so that the state of the grid (such as grouping and collapsing of rows) is maintained, but if I'm reading the documentation correctly, this won't include any CSS definitions, so the HTML would convert without styling.
I know that I could use ConvertUrl, and I will if I have to, but that would mean extra work on my end to ensure that some state information about the grid is maintained (which is outside the scope of PDF conversion, I understand). So I'm looking to see if there is support for CSS using the ConvertHtml functionality. Is it a matter of including the <link> tags in the HTML that is sent to the conversion method? I appreciate any and all responses. Thanks, and great product!
James McConnell
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
You need to set HtmlToPdf.Options.BaseUrl. That's the base url to be used to resolve all relatives Urls in your page, such as link, a, img, etc.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 3/13/2012 Posts: 3
|
I see, I think that just might solve my issue! I'll have to get in there and mess with some code, but that sounds like it should do what I need it to do, which would save me a lot of work in the long run. Thank you for the very fast response, very much appreciated!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
You are very welcome. Please feel free to let us know if you have any more questions.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 3/13/2012 Posts: 3
|
Just wanted to let you know this worked like a charm!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Great. Glad that it works for you!
|
|