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

Footers and Headers are not transparent, while body is. #2416

Closed
Maxyme opened this Issue Jun 17, 2015 · 13 comments

Comments

Projects
None yet
7 participants
@Maxyme

Maxyme commented Jun 17, 2015

This issue appears when applying a pdf as background to a wkhtmltopdf generated pdf. It seems transparency is applied to the body, but not to the footer and headers.

This was tested with 0.12.2.2. The background was applied using PdftkServer.

errorfooter

@ashkulz ashkulz added the Verified label Jun 23, 2015

@ashkulz ashkulz added this to the 0.12.3 milestone Jun 23, 2015

@ashkulz

This comment has been minimized.

Member

ashkulz commented Jun 23, 2015

Can you post the sample HTML/image so that I can verify the fix?

@Maxyme

This comment has been minimized.

Maxyme commented Jun 24, 2015

Included are the html files that make the testFooter.pdf with wkhtmltopdf, using the following command:wkhtmltopdf.exe --footer-html footer.html body.html testFooter.pdf.

Also included is the background.pdf used with pdftk server and the following command:
pdftk.exe testFooter.pdf background ColorBackground.pdf output finalPdf.pdf.

Finally, the final document with non-transparent footer is included

All the files are here:
https://www.dropbox.com/sh/1ivfts2vya6z1sh/AABaI0kvnUIfyWHaX-OlVWjGa?dl=0

@Qronicle

This comment has been minimized.

Qronicle commented Jul 22, 2015

Just letting you guys know I have the same issue on a Ubuntu server (wkhtml version 0.12.2.1).
(Was adding backgrounds with pdflib, didn't know about the tool Maxyme uses, will definitely try it out)

@jspath

This comment has been minimized.

jspath commented Apr 7, 2016

Is there any update on this issue? We're currently experiencing it in 0.12.3.

We are going to try building 0.12.4-dev

@ashkulz ashkulz modified the milestones: future, 0.12.3 Apr 10, 2016

@ashkulz

This comment has been minimized.

Member

ashkulz commented Apr 10, 2016

Nope, it's not yet fixed. Time to work on this project has been in short supply lately, so cannot guarantee an ETA for this fix.

@ashkulz

This comment has been minimized.

Member

ashkulz commented Apr 14, 2016

I have a fix, but unfortunately the dropbox folder created by @Maxyme seems to be empty. Does anyone have a sample I can verify before committing the changes?

@ashkulz ashkulz closed this in 3250954 Apr 14, 2016

@ashkulz ashkulz added Fixed and removed Verified labels Apr 14, 2016

@ashkulz ashkulz modified the milestones: 0.12.4, future Apr 14, 2016

@ashkulz

This comment has been minimized.

Member

ashkulz commented Apr 14, 2016

Used the testcase posted in #2084 to verify the fix.

@buffcode

This comment has been minimized.

buffcode commented Jun 1, 2016

Is there any kind of HTML/CSS/command-line workaround / hotfix for the time being? As 0.12.4 is unreleased.

@ashkulz

This comment has been minimized.

Member

ashkulz commented Jun 1, 2016

@buffcode: you can build it yourself, it would be stable for regular usage. I'm planning on releasing 0.12.4 within a month or two.

@jspath

This comment has been minimized.

jspath commented Jun 1, 2016

@buffcode I built the header/footer page as a standalone page. I then used Perl's PDF::API2 to combine the header page and the content page.

I also used PDF::API2 for per page background colors and images.

@Formalizer

This comment has been minimized.

Formalizer commented Aug 13, 2016

@ashkulz as per your recommendation, I'm now trying to build it, but got this when Setting Up the Build Environment (on Debian 8 Jessie) like this:

sudo scripts/build.py setup-schroot-jessie
.....
W: Failed to fetch http://ppa.launchpad.net/pov/wkhtmltopdf/ubuntu/dists/lucid/main/binary-amd64/Packages 404 Not Found
W: Failed to fetch http://winswitch.org/dists/VERSION/main/binary-amd64/Packages 404 Not Found
.....

Any recommendations?
Thank you!

@ashkulz

This comment has been minimized.

Member

ashkulz commented Nov 23, 2016

0.12.4 has been released, which should contain the fix for this issue. Please report back if it is not solved with the above version.

@ktrzos

This comment has been minimized.

ktrzos commented Feb 28, 2018

This problem still occurs on v0.12.4. Does any tag from header should have any CSS styles related to background-color: transparent;?

My header HTML code:

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8"/>
    </head>
    <body style="margin:0;padding:0 0 0 10mm;">
        <img
            src="/images/logo.png"
            style="width: 250px; height: auto; float: left; margin-top: 20px;"
        />
    </body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment