Background Color:
 
Background Pattern:
Reset
Search

Forum

Please Log In

We want you to contribute! 

This forum is a moderated environment. 
We try to keep it neat and tidy. In order to access the forum content we would like you to either or register.

HomeHomeScryberScryberFeature wish li...Feature wish li...Add HTML to PDFAdd HTML to PDF
Previous
 
Next
New Post
4/29/2014 5:34 PM
 

Hello there,

I would like to know if there is a way to take (relatively) simple HTML--containing bold/italic/underline/lists/headings--and add that to a PDFPanel. I am using the programmatic interface to create a PDF form-like document and some of the user-created text is formatted in HTML, which then needs to be included in the PDF. Thanks for any input!

 
New Post
5/1/2014 9:04 AM
 

Yep - good call Alan.

It's something we are looking at implementing with an Article component. Taking complex textual content (RTF, Wiki markup, HTML) and building PDF components at binding time. Should be in our 0.9 release.

One question for you - would the content be well formatted XHTML with a single root (e.g. Wrapped in an outer Div) or would you expect multiple top-level nodes in the self served content, and unclosed tags?

 
New Post
5/1/2014 4:27 PM
 

Thanks for the reply!

I would imagine the content could be either rooted or unrooted, but I wouldn't be opposed to"wrapping" our content in a <div> or <span> if that would help. Also, is there a time schedule for when 0.9 will be available? I just need a rough estimate that I can bring to my team here so we discuss our options.

 
New Post
5/2/2014 10:59 AM
 

0.9 is in progress, and we will be looking to release in Q3 this year. 

Cannot be more accurate than this at the moment I'm afraid, but I hope it give you at least some idea.

 

 
New Post
12/16/2014 7:12 PM
 

Is the HTML to PDF functionality available in the current version of 0.9?  Our company is evaluating Scryber for one of our client projects for their purchase.  As of today the only version we see available on Nuget or the Visual Studio Gallery is 0.8.8.5.  We would like to test the HTML functionality but do not see it available.  Is there a way to get version 0.9.x with the watermark?

 
New Post
12/16/2014 8:28 PM
 

Hi Scott - hit a bone of contention there.

What we can offer today is the Structure component detailed here - http://www.scryber.co.uk/HowTo/tabid/...

This will accept a string of scryber components that can be data-bound in the example. So you can take your xhtml, transform it as required and set the value.

As for input of HTML - I actually don't think we will make this for 0.9 as a final version. There are too many queries such as support for CSS inline styles, CSS referenced styles, images within CSS, invalid HTML, floating content, absolute and relatively positioned elements... the list is endless. 

We may get to a point where well formed XHTML snippets are supported and maybe CSS referenced styles but not at the moment. Could not support the vague-ness to end producers.

I hope this at least explains the situation. For the moment, if you can convert the HTML to PDFX then bring it in with the Structure.

 
New Post
12/16/2014 8:30 PM
 

And if you do manage to get a good solution for HTML content and want to share we would definitely throw in some licenses.

 
New Post
12/17/2014 1:44 PM
 

Thanks for your replay and for your explanation.  I hope I didn't hit that bone too hard.

We completely understand the complexity of the HTML input.  This question came from a request for a .NET solution to converting an HTML page to PDF.  After learning the basics of Scryber, we liked what we saw and started working on the solution.  But quickly realized the complexity and found this thread after some research.

To solve this, we are setting up rules to simplify the HTML and CSS, because we have control over these in this project.  These rules will remove any in line styles and only use Scryber recognized tags/properties.  This won't allow any HTML document to be parsed to Scryber, but if we follow the rules it will work for the reports we want to convert to PDF.  

This solution I think falls into the "vague-ness" you mentioned in your reply.  We will let you know if we take it further to something that accepts more complex HTML.

 
New Post
12/17/2014 2:11 PM
 

Not too hard Scott, don't worry :-)

One of the other things we were (and still are) looking at is the html agility pack on CodePlex. It's Microsoft public license and with our limited testing will do a pretty good job of parsing html into a DOM and can use xslt or xpath from there. http://htmlagilitypack.codeplex.com

You might want to check this out.

 
Previous
 
Next
HomeHomeScryberScryberFeature wish li...Feature wish li...Add HTML to PDFAdd HTML to PDF