Skip to content
This repository was archived by the owner on Jan 2, 2023. It is now read-only.
This repository was archived by the owner on Jan 2, 2023. It is now read-only.

Duplicate cookies when printing Header/Footer #1870

@serovpetr

Description

@serovpetr

wkhtmltopdf Version : 0.12.1.0

Operating System and Version: Windows 7 Enterprise x64 Service Pack 1
Application based on ASP.Net

Description:

I'm trying to generate PDF with footers or headers. The source page, requires form authentication, so I pass cookies to converter using --cookie argument.

Main html converts correctly, but when converter send requests to footer html page, in debugger I see cookies duplicate in request. The result is that by URL number 6 (for examle) there are then 6 times the number of cookies, because of one of cookies is an auth cookie, request quickly becomes too big and IIS blocks it.

Result:

So if Geneated pdf contanins more then 6 ~ 7 pages, converter exits with error code =1, but I can open Result Pdf. After 7 page, instead of of footer i see Label: "Http error 400 Bad Request. Request header too Large "

When i use cookie-jar argument, with username and password, everything works correctly, but I can't use this way because of security context.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions