Closed Matt-17 closed 5 months ago
Hi @Matt-17, sorry for the slow response.
If you haven't managed to sort this, please upgrade to the latest version 6.x.x (beta) - There are a few things we need to sort before really pushing it out and these may affect layout.
Version 5 docs are here, and use the {@:author} notation.
I hope this helps.
Richard
Sorry for my late answer. Thank you for your answer. I tried it out and it worked so far, but I got some issues, that pushed me back to iTextSharp. But I can close this issue, as it's solved by your answer. ;-)
Just to add my problems: I could not get rid of the header/footer margins when adding those to the page. I know it's supposed to be like this, but I could not figure out to create a well looking document. The second issue is the template engine, here I would not implement an own, while there are existing good ones like RazorLight or Handlebars.Net. I haven't figured out yet, if there is the need for an own engine. Just my 2 cents. I am watching this project and hopefully I can use this one in future, as it looks very promising. Thank you!
Hi Matt, I appreciate the feedback - thank you, although slightly saddens me you were not able to get scryber to do what you wanted, especially as I hoped the design and visual side is one of it's core strengths.
Without wishing to try and counter, there are strong implementation reasons for the roll your own engine (css, path binding etc), and a body with padding 0px, and then inner main or section with padding should alleviate your header and footer issues.
If there is anything else you were having issues with I would love to hear about it. This feedback is valuable to me as it comes from someone who is not completely immersed in and tailored to the engine's layout mechanisms.
Richard
Describe the bug I just wanted to get into Scryber, as it seems very promising. But I cannot even get the minimal sample to work.
To Reproduce
Install-Package Scryber.Core
(Version 5.0.7)Test.html
using Scryber.Components;
using var doc = Document.ParseDocument("Test.html"); doc.Params["author"] = "Hello World"; using var stream = new MemoryStream(); doc.SaveAsPDF(stream);
var fileContents = stream.ToArray(); File.WriteAllBytes("Test.pdf", fileContents);