Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing information on usage #31

Open
diasjoaocarlos opened this issue Jul 9, 2020 · 1 comment
Open

Missing information on usage #31

diasjoaocarlos opened this issue Jul 9, 2020 · 1 comment

Comments

@diasjoaocarlos
Copy link

I am using this C# converter from html to pdf.

In the .csproj I have:

<ItemGroup>
<PackageReference Include="Codaxy.WkHtmlToPdf" Version="0.5.8" />
</ItemGroup>

I want to use in the controller something like:

        PdfConvert.ConvertHtmlToPdf(new PdfDocument
        {
            Url = "http://wkhtmltopdf.org/",
            HeaderLeft = "[title]",
            HeaderRight = "[date] [time]",
            FooterCenter = "Page [page] of [topage]"

        }, new PdfOutput
        {
            OutputFilePath = "wkhtmltopdf-page.pdf"
        });

(this is the same code as in GitHub).

However, when I do (in the same controller):

using Codaxy.WkHtmlToPdf;

the project doesn't build (and shows error in the VS editor...). The error presented is:

Error CS0246 The type or namespace name 'Codaxy' could not be found (are you missing a using directive or an assembly reference?)

The GitHub page of the project lacks directions on using using directive....

Could you help me?
I am using VS2019 and .Net Core 2.1

@mstijak
Copy link
Member

mstijak commented Jul 9, 2020

Maybe Nuget installation failed. You can always manually copy this file into your project - https://github.com/codaxy/wkhtmltopdf/blob/master/NuGet/Codaxy.WkHtmlToPdf/content/PdfConvert.cs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants