Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Sai Raj R 11 posts 81 karma points
    Apr 29, 2016 @ 14:06
    Sai Raj R
    0

    Inline styles and italics are not working

    Hi Team,

    PDF creator License No : 4503144636 / SA016785 / PU015212

    We are facing few queries while implementing the PDF generator in project.

    Following are the Questions i need clarification's.

    1. Is there any way to process inline styles
    2. It seems that Underlines are not coming in the PDF
    3. There are some custom tag in the HTML can we add razor to process the same.
    4. Chances of outdated tags are there will it be processed ie : both the following tags (<b>, <strong>) will get processed ?

    Thanks
    Sai Raj R

  • Darren Ferguson 1022 posts 3259 karma points MVP c-trib
    Apr 30, 2016 @ 07:33
    Darren Ferguson
    100

    Hello Sai,

    Could you post your template?

    If you look at Pdf.chstml which ships with the package - you'll see a helper called ParseElement

    Within this helper is a case statement:

     switch (node.Name)
        {
            case "p":
                @Pargraph(node)
                break;
            case "strong":
                @Bold(node)
                break;
            case "em":
    

    If you don't see the tag that you want to process in here then you'll need to handle it yourself and write some FO to represent your style.

    Parsing inline styles isn't supported by default, you'd need to add something custom, though I imagine this would be quite complicated.

    Thanks.

  • Sai Raj R 11 posts 81 karma points
    May 03, 2016 @ 07:52
    Sai Raj R
    0

    Hi Darren,

    Thank you for your clarification . This one solved many of my issue.

    Is there any option to add inline styles to the PDF.

    I am currently working with dummy data i will share the exact HTML in a day.

    Thanks Sai Raj R

  • Darren Ferguson 1022 posts 3259 karma points MVP c-trib
    May 03, 2016 @ 08:58
    Darren Ferguson
    0

    Hi Sai,

    We don't have anything included to support inline styles - that'd be something that you'd need to write yourself.

    I'd be happy to suggest and approach as to how you might do this if you can share the HTML.

    Thanks.

Please Sign in or register to post replies

Write your reply to:

Draft