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

Problem with Zoom and Page Size settings #5

Closed
zejtin opened this issue Jun 7, 2018 · 2 comments
Closed

Problem with Zoom and Page Size settings #5

zejtin opened this issue Jun 7, 2018 · 2 comments

Comments

@zejtin
Copy link

zejtin commented Jun 7, 2018

Hello,

I have a problem with zoom and page size settings i receive error from wkhtmltopdf, this is my config:

Shark.PdfConvert.PdfConversionSettings config = new Shark.PdfConvert.PdfConversionSettings
                    {
                        Title = "Converted by Shark.PdfConvert",
                        LowQuality = false,
                        Margins = new Shark.PdfConvert.PdfPageMargins() { Bottom = 10, Left = 10, Right = 10, Top = 10 },
                        Size = Shark.PdfConvert.PdfPageSize.A4,
                        Zoom = 1.2f,
                        OutputPath = @"C:\DATA\pdfSharkTest.pdf"
                    };

this is the error i receive:

WkHTMLToPdf conversion of HTML data failed. Output: \r\nWkHTMLToPdf exited with code 1.

am I using it wrong? :) without Zoom and Size options it generates file normally

cp79shark added a commit that referenced this issue Jun 7, 2018
@cp79shark
Copy link
Owner

No, you're not using it wrong. I had it wrong with where those options should go and a missing space in the configuration.

I have the code changes and added a test for those two options. Uploaded a new version to NuGet (1.0.3) and it should be visible shortly.

If that doesn't help let me know.

@zejtin
Copy link
Author

zejtin commented Jun 7, 2018

Thank you for the fast fix, It works perfectly now!

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