Code Monkey home page Code Monkey logo

Comments (7)

tinyfingersdev avatar tinyfingersdev commented on July 29, 2024

I was able to replicate the issue as well. If you aren't using page numbering, you could put the copyright information and symbol in an external html file (via HtmlUrl in your FooterSettings) and reference that as a temporary workaround.

But if you do this, it looks like that overrides anything in RightText, LeftText, etc...

image

from tuespechkin.

tuespetre avatar tuespetre commented on July 29, 2024

Strange. When creating an ObjectSettings with the copyright symbol as the only character for the HtmlText and the CenterText of the header, I get A with a tilde in the header but A with a circumflex in the body. I will try to look into this.

from tuespechkin.

thiagonsiq avatar thiagonsiq commented on July 29, 2024

Thanks @tuespetre

@slpaige - the PDF conversion on our site takes less than 4 seconds once the "download" button is pressed. As soon as i introduce the footer code, the performance drops dramatically...the file does not download.

objectConfiguration.Footer.SetHtmlContent("©Trying this copyright");

Have you experienced this before?

from tuespechkin.

tinyfingersdev avatar tinyfingersdev commented on July 29, 2024

@tsiqueira86 - It looks like your using an older version of the code (prior to 1.0.0). That method is also expecting a page URL. You will need to create a static html page (or create a dynamically generated temporary page) and reference that page URL within SetHtmlContent.

I've linked to the relevant source code (version .9.3.3)

/// <summary>
/// Sets the URL for the HTML document to use as a header/footer. The text are ignored in this case.
/// </summary>
/// <param name="htmlUri">URI for the document</param>
/// <returns>config object</returns>
public HeaderSettings SetHtmlContent(string htmlUri)
{
_htmlUrl = htmlUri;
return this;
}

Using the newest version of the library, you could reference the html page like this: (based on the example in the ReadMe)

Objects = {
    new ObjectSettings 
    { 
        FooterSettings = 
        {
            HtmlUrl = "http://path/to/file.html",
            FontSize = 8,
        }
    }
}

from tuespechkin.

thiagonsiq avatar thiagonsiq commented on July 29, 2024

I won't have time to try this today, but I'll give this a shot in the next few days and reply here to let you know.

Thanks for the prompt replies!!

from tuespechkin.

tuespetre avatar tuespetre commented on July 29, 2024

If you do get a chance, please be sure to test conversion using wkhtmltopdf directly. If there is still a problem, you will want to create an issue there (and if you do, share that information with us here, please.)

from tuespechkin.

tuespetre avatar tuespetre commented on July 29, 2024

Closing for lack of activity, please re-open if the issue persists and you have new information, or better, distinguish if this occurs using wkhtmltopdf directly and if so, create an issue in that repository.

from tuespechkin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.