css - Make text present in PDF document, but invisible -
how can have text in html document “there” in pdf document (generated via wkhtmltopdf
), invisible when viewed or printed?
constraints:
the text must appear @ right place, right size, because purpose find text automated tool , discover co-ordinates , size on page.
the solution must text only, because i'm trying keep css styles. “hide under element” doesn't address problem, because there might not other element @ co-ordinates.
the solution can't dependent on what's on page; can't go inspecting background elements on page because can't determine dynamically. text should invisible in own right.
the text must findable automated tool (e.g.
pdfgrep
), meanswkhtmltopdf
must place text in document file.so “display: none” style or “opacity: 0” doesn't work, because makes text not exist @ in pdf document.
so want have html document, place text element “foo” within document inline css style, , process through wkhtmltopdf
; then, pdfgrep foo
should find text, text location , size should correct, text should not show in html, not appear when pdf viewed, , not appear when it's printed.
with style of color: transparent;
text transparent on page, show tool looking in document text.
Comments
Post a Comment