profile
viewpoint

antialize/wkhtmltopdf-bindings 26

Wrappers to wkhtmltopdf

antialize/SvgView 5

Simple SVG viewer with zoom and pan support.

antialize/utils 2

Small simple utilities

freekvw/tpie 2

Templated Portable I/O Environment

jasn/RASMUS 2

Relational programming language RASMUS

antialize/compressed_stream_test 1

Compressed stream test

antialize/lsfs 1

Simple filesystem for a SMALL number of LARGE and relative static files

issue commentwkhtmltopdf/wkhtmltopdf

Could not copy text in pdf when using font-family in ubuntu system

I unpacked your 1.pdf (with PDFtk) and saw why you couldn't select and copy the "Arial" text -- as I suspected, it was pure graphics (no text write commands).

I was unable to reproduce the problem on my Windows 10 box. I tried as the font-face src both my standard Arial font (/WINDOWS/Font/arial.ttf) and the one you sent. The two font files are identical, so it doesn't look like your Arial font got damaged somewhere. The PDF I produced (wkHTMLtoPDF 0.12.5 with patched qt) displays "Arial" text as selectable and can be copied. The stream is text output of 5 glyphs. I do see that the "Arial" text is in a slightly different position when I created it, than in your 1.pdf -- can you double check that your 1.pdf matches your 1.html you sent me? I also see that the "cm" global page transformation matrix is slightly different.

1U.pdf is your original, uncompressed. 2U.pdf is from when I ran wkHTMLtoPDF against 1.html 1U.pdf 2U.pdf

sonicx991

comment created time in 5 hours

issue commentwkhtmltopdf/wkhtmltopdf

Could not copy text in pdf when using font-family in ubuntu system

Yes.The Arial text display ok,but can't be copied."the test of the output pdf" means the pdf output by wkhtmltopdf[for test].The arial font is a ttf.I list the 1.html 1.pdf and arial font below.So you can see all the Info

test5.zip

sonicx991

comment created time in 11 hours

issue commentwkhtmltopdf/wkhtmltopdf

Could not copy text in pdf when using font-family in ubuntu system

Does the Arial text display OK, and you only can't copy it into a buffer? And what do you mean by "the test of the output pdf"? Did you mean "the rest of the output pdf"? Can non-Arial text be copied, and just the Arial has problems?

Take a look at where your Arial font is coming from (assuming you can see it in the document). Is it some oddball format such as .WOFF? I've heard of problems where such fonts are rendered as graphics collections and not text, and cannot be copy-pasted as a result.

sonicx991

comment created time in 13 hours

issue commentwkhtmltopdf/wkhtmltopdf

Large amounts of whitespace appearing after images in tables

Thank you for your response. The content of the class="customHtmlArea" primarily comes from a rich text editing component called Summernote, but I think the users often paste formatted text into that from other programs. I know they've done this from MS Word in the past, so the HTML inside those sections often contains all sorts of junk. I've been trying unsuccessfully to find a workaround that I can apply to the customHtmlArea class in CSS that resolves the issue. Setting a max size on .customHtmlArea img has resolved the whitespace in some places but not others, but the client has since come back and said that resizing the images isn't an acceptable solution anyway.

The possibility of doing some sort of preprocessing of the HTML before populating the customHtmlArea divs has crossed my mind but isn't something I've tried doing.

The keepOnSamePage class is basically just page-break-inside: avoid; - to try to keep the contents on the same page. These are nested as the client doesn't want page breaks to occur within the rows of tables and, where they fit, wants the related rows on a table to be kept on the same page, and where possible the entire tables to be kept on one page. The tablettes are "parts" of what appears in the document as one big table without any spacing between the tablettes.

Unfortunately I've just been assigned to a different project so going to have to put this on hold for a week or two. But thanks for taking the time to offer your insight!

DavidParkerUk

comment created time in 16 hours

issue commentwkhtmltopdf/wkhtmltopdf

Could not copy text in pdf when using font-family in ubuntu system

if the html contains placeholder1->if the html contains "<span style="font-family:'楷体'">"

sonicx991

comment created time in 18 hours

issue commentwkhtmltopdf/wkhtmltopdf

Could not copy text in pdf when using font-family in ubuntu system

    @font-face {
        font-family: "Times New Roman";
        src: url("/usr/share/fonts/truetype/Times_New_Roman.ttf")
    }

    @font-face {
        font-family: "webdings";
        src: url("/usr/share/fonts/truetype/webdings.ttf")
    }

    @font-face {
        font-family: "Wingdings";
        src: url("/usr/share/fonts/truetype/Wingdings_2.TTF")
    }

Such kind of font-face has been used,and I have copied these fonts to /usr/share/fonts/truetype/

sonicx991

comment created time in 18 hours

issue openedwkhtmltopdf/wkhtmltopdf

Could not copy text in pdf when using font-family in ubuntu system

if the html contains <span style="font-family:'Arial'">placeholder1</span>, the test of the output pdf could not be copied in ubuntu 18.04 system(or other linux,docker etc).works fine in win10 system.And if use the default font(no more font-family).It could be copied as well.

created time in 18 hours

issue commentwkhtmltopdf/wkhtmltopdf

Cell padding not rendering in PDF

Same here. Are you going to fix this someday?

mrtwo87

comment created time in 19 hours

issue commentwkhtmltopdf/wkhtmltopdf

Large amounts of whitespace appearing after images in tables

The line of HTML in question (line 650) is (broken up into convenient pieces):

<div class="customHtmlArea">
  <img style="width: 400px;" src="data:image/jpeg;base64... first of three images ... 
     last of three ..." data-filename="DSCF4207.JPG"><br>
  <span style="left: 149.026px; top: 460.776px; font-size: 17.0049px; font-family: sans-serif; 
    transform: scaleX(0.896551);">
    A number of automatic vents at the top of the atrium over the communal lounge are installed. 
    These are subjected to the
  </span>
  <span style="left: 149.026px; top: 477.781px; font-size: 17.0049px; font-family: sans-serif; 
      transform: scaleX(0.895906);">
    necessary tests and servicing regime.
  </span>
</div>

Notice that the three images appear across (side-by-side) in a browser, unless the window is narrow. When narrow enough (including the PDF production), they're stacked three-high. It's interesting that the caption ("A number of...") is broken into two pieces, and when joined (in both a browser and in the PDF) "the" and "necessary" are run together. I see this in other text, too. If you have any control over the HTML production, you might want to look into this. I don't know why it would be necessary to break the caption into multiple pieces, as they did, except that perhaps it was intended to be two lines all along, and in both HTML and the browser they just get glued together. Was the original produced with something like Illustrator or Quark XPress? Also, the caption <span> has positioning (top and left, in px) that looks like it could be relative to the media left side (but ??? for the distance down from the "top"). In either case, not relative to the table cell (<td>)? Anyway, the caption seems to properly vertically align, and the problem is empty space below it.

Possibly the use of some other Word Processing system to produce the original HTML is giving you HTML that is marginally acceptable (many run-together words when displayed in a browser), but is scrambling wkHTMLtoPDF. You might also play with different dpi settings to properly translate the pixel values into the intended dimensions. Finally, the following row is under a couple nested <table>s

 <div class="keepOnSamePage">
                    <table class="significantFindingTablette">

and maybe there is something in those two classes which is adding extra space after the previous row.

DavidParkerUk

comment created time in a day

issue commentwkhtmltopdf/wkhtmltopdf

Segfault on Alpine when html is not empty

Well, I just ran your last three examples on Windows 10, wkHTMLtoImage 0.12.5, with no problems at all. No errors or crashes, and the JPEG image displays TEST. I guess there's something odd about the Linux (or just Alpine) build, but I'm out of ideas here. Maybe someone can try 0.12.6 on Windows or some other OS. Good luck!

hourlier96

comment created time in a day

issue commentwkhtmltopdf/wkhtmltopdf

Segfault on Alpine when html is not empty

'qrcode' class was just supposed to insert a background image, which works when the div inside body tag is empty.

I don't think the problem comes from any of css stuffs here.

It seems that the html parsing fails at some point:

So when i have image The jpg is created without segfault, but no text appears inside.

But also this image returns the same result

However this image returns a segfault and no jpg is created

I don't see any kind of logic...

hourlier96

comment created time in a day

issue openedwkhtmltopdf/wkhtmltopdf

Large amounts of whitespace appearing after images in tables

wkhtmltopdf version(s) affected: 0.12.6 64-bit

OS information Windows Server 2012 R2 Datacenter

Description A client has reported extra whitespace below some images that are inside tables on generated PDF files. The whitespace does not appear when the HTML version of the document is viewed.

How to reproduce See page 4 of the PDF in the attached demo ShortenedWhitespaceDemo.zip The issue is occurring, fairly randomly, after IMG elements inside tables. The attached ZIP contains an example HTML file and wkhtmltopdf command that produces a PDF with the problem on version 0.12.6.

Expected behavior I'd expect the table row to end right after the image as it does when the HTML version is viewed in web browser.

Possible Solution
I've noticed adding max-width and max-height CSS to the image can make the whitespace disappear or appear smaller. However a set of values that work for one image don't fix the problem for other images, plus the client isn't keen on having their images resized. The issue is a bit random, guessing it depends on where abouts the page breaks end up happening as changing things on the previous page can sometimes make the issue go away. The issue has only been reported since updating from v0.11.0rc2 which they've been using for years, to version 0.12.6. We had to update the wkhtmltopdf version as the older 32-bit version kept hitting the 2 GB memory barrier and crashing (the attached example of the problem is 2 pages from a larger document that can have several hundred pages with lots of large embedded images).

created time in a day

issue commentwkhtmltopdf/wkhtmltopdf

Segfault on Alpine when html is not empty

A long shot, but is this 'qrcode' class supposed to generate a QR Code at that point? Is the innerHTML supposed to be the text to be encoded (might not allow any markup tags), or is there supposed to be nothing there? (Where does it get the content for the QR Code?) Finally, might this class be written in advanced CSS/JS that blows up on the back-level WebKit that wkHTMLtoPDF uses?

hourlier96

comment created time in 2 days

issue openedwkhtmltopdf/wkhtmltopdf

xsl stylesheet working locally but not working in iis server

wkhtmltopdf version(s) affected: x.y.z

OS information <!-- Your OS specification -->

Description When i try to generate as pdf, this error returned: QPaintDevice: Cannot destroy paint device that is being painted. at Rotativa.WkhtmlDriver.Convert(String wkhtmlPath, String switches, String html, String wkhtmlExe) at Rotativa.WkhtmltopdfDriver.Convert(String wkhtmltopdfPath, String switches) at Rotativa.AsPdfResultBase.WkhtmlConvert(String switches) at Rotativa.AsResultBase.CallTheDriver(ControllerContext context) at Rotativa.AsResultBase.BuildFile(ControllerContext context) at BusinessPlanPortal.Controllers.BusinessPlanController.BusinessPlan(Int32 ID)

Can anyone help me about this

How to reproduce <!-- Html/css code and/or command line arguments needed to reproduce the problem. -->

Expected behavior <!-- A clear and concise description of what you expected to happen. -->

Possible Solution
<!--- Optional: only if you have suggestions on a fix/reason for the bug -->

created time in 2 days

issue commentwkhtmltopdf/wkhtmltopdf

watermark feature is supported ?

@Tomsgu I tried to treat it with css but it doesn't appear at all pages. .water-mark::before { content:""; position: fixed; opacity: 0.1; z-index: 1; transform: rotate(-45deg) translateX(-50%) translateY(-50%); -webkit-transform: rotate(-45deg) translateX(-50%) translateY(-50%); top: 30%; left: 50%; background-image: url('path/image.png') width: 629px; height: 191px; }

dipenpatel235

comment created time in 2 days

issue commentwkhtmltopdf/packaging

Lambda release

https://github.com/wkhtmltopdf/packaging/blob/b32dc1be3bc278176d73cf15714ea1dbd8deab1e/build.yml#L313 changed to amazonlinux:1 Sorry for over-simplify things here, but in the packaging repo (wkhtmltopdf repo in parallel) running command: ./build package-docker amazonlinux2_lambda ../wkhtmltopdf, and expecting a zip output. This is taking some while to complete.

lnmunhoz

comment created time in 2 days

issue commentwkhtmltopdf/packaging

Lambda release

I assume it'll be doing similar changes to #77 but for AmazonLinux 1 (by changing from to amazonlinux:1)?

lnmunhoz

comment created time in 2 days

issue commentwkhtmltopdf/packaging

Lambda release

Sure, if it's not going to be EOL soon I'll happily merge a PR :-) Can anyone advise on what changes it will take to get the layer for amazonlinux 1.

(Sorry i am still wrapping my head around all this, but any starting point will be nice).

lnmunhoz

comment created time in 2 days

issue commentwkhtmltopdf/wkhtmltopdf

Segfault on Alpine when html is not empty

Thx for reply.

I can confirm that css is well parsed, since i got same problem by removing it.

image

For example just adding the p tag (even empty) makes it crash

I have same problem with wkhtmltopdf.

hourlier96

comment created time in 2 days

issue commentwkhtmltopdf/wkhtmltopdf

bing.com (and others) export hangs on every operating system

I have a similar situation with a intranet site using: wkhtmltopdf 0.12.6 (with patched qt) Windows Server 2012

Example:

wkhtmltopdf.exe http://d-paas/efc/efc.asp eduardo.pdf
Loading pages (1/6)
Error: Authentication Required
Counting pages (2/6)
Resolving links (4/6)
Loading headers and footers (5/6)
Printing pages (6/6)
Done
Exit with code 1 due to network error: AuthenticationRequiredError

If I put username, the process hangs and the IIS start generating lines in the log until I kill the exe:

wkhtmltopdf.exe --username coiso --password xpto http://d-paas/efc/efc.asp eduardo.pdf
Loading pages (1/6)
[======>                                                     ] 10%
QWaitCondition: Destroyed while threads are still waiting    ] 10%
^C
Athlon1600

comment created time in 2 days

issue commentwkhtmltopdf/wkhtmltopdf

Auto page size based on content size

By the way, I see a lot of comments stating that the "standard" page size is A4 (595Pt x 842Pt). Keep in mind that wkHTMLtoPDF apparently sets this (via MediaBox), and that all by itself (no MediaBox), the standard PDF page size is US Letter (8.5in x 11in, 612Pt x 792Pt). If you want US Letter page size with wkHTMLtoPDF, you need to set the page size to that explicitly.

kachkaev

comment created time in 3 days

issue commentwkhtmltopdf/wkhtmltopdf

Font display issue comparatively dompdf pdf.

You're talking about the "condensed" (horizontally compressed) nature of the text? A couple long shots:

  1. For some reason you're actually using bold font, on regular-weight glyph widths. I've heard of cases before where wkHTMLtoPDF insists on using bold weight for some reason, sometimes even going so far as to do a "poor man's bold" by shifting and overprinting the text. You can check for that by greatly zooming in on the text to look for slight offsets.
  2. The HTML uses some advanced CSS3 that is being misinterpreted by wkHTMLtoPDF (what version?).
ravigopani

comment created time in 4 days

issue commentwkhtmltopdf/wkhtmltopdf

Segfault on Alpine when html is not empty

Have you confirmed that you have a local copy of qrcode.css, that is accessible in that path? If you are reading qrcode.css, does it contain advanced CSS3 that 0.12.6 might not support? (Try 0.13 beta.) If you're not successfully reading qrcode.css, you may have to use the flag to enable reading local files (which it sounds like you tried). Does this work with wkHTMLtoPDF?

hourlier96

comment created time in 4 days

issue commentwkhtmltopdf/wkhtmltopdf

css3 columns is not support

At least through version 0.12.5, most (if not all) of CSS3 is not supported (old WebKit). Same problem for a lot of JavaScript enhancements. I don't know if the situation is any better with 0.12.6, or 0.13 (beta). You might give those a try if you haven't already.

sinslu

comment created time in 4 days

issue openedwkhtmltopdf/wkhtmltopdf

Font display issue comparatively dompdf pdf.

while I use Dompdf library to generate pdf it generate pdf perfectly as my expectation as following first image. but while I generate pdf with WKHTML with same format it slightly decreasing font spacing. please let me know it you have any solution. and i am using "sans-serif" font style in both case. Thank you.

  1. pdf by DomPdf working fine dWPam

  2. pdf by WKHTML decreasing font space. naNDY

created time in 4 days

issue openedwkhtmltopdf/wkhtmltopdf

Segfault on Alpine when html is not empty

wkhtmltopdf version(s) affected: 0.12.5 / 0.12.6

OS information Alpine Linux 3.12.0

Description Using wkhtmltoimage with this html works well image

But as soon as i try to add any content in the html like:

  • an empty 'p' tag
  • a 'img 'tag
  • a empty 'form' tag

it gives me a segfault in the result image

Note that I can add some text without any tag in the html, wkhtmltoimage won't segfault, but it doesn't display the text in the image

How to reproduce With 0.12.6 version, use the html given above , and try to add any of the tag listed and run: <code> wkhtmltoimage --width 2560 --height 1600 --enable-local-file-access /path/to/your/html output.jpg </code>

Expected behavior No segfault and image is generated

Possible Solution
<!--- Optional: only if you have suggestions on a fix/reason for the bug -->

created time in 4 days

pull request commentwkhtmltopdf/wkhtmltopdf

Page Orientation V.2019

Thanks Ashish,

Yes the comment I think should be included in the PR I just am not such a big user of GItHub that I need to see how to do it easily.

P.

On Tue, Nov 24, 2020 at 7:48 AM Ashish Kulkarni notifications@github.com wrote:

Great work, this works great but I've found a bug that I think is related to the issue @mrdj07 https://github.com/mrdj07 was having.

I believe if the document orientation is set to Portrait, but the last page is a landscape and contains multiple pages it will then produce an error

@knash94 https://github.com/knash94, can you link/add a minimal test case so that we can verify this?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/wkhtmltopdf/wkhtmltopdf/pull/4439#issuecomment-732656477, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAUT4NPSX52AAAMEOEFGXHTSRNI3LANCNFSM4IKOH2SQ .

PerlTester

comment created time in 4 days

pull request commentwkhtmltopdf/wkhtmltopdf

Page Orientation V.2019

Great work, this works great but I've found a bug that I think is related to the issue @mrdj07 was having.

I believe if the document orientation is set to Portrait, but the last page is a landscape and contains multiple pages it will then produce an error

@knash94, can you link/add a minimal test case so that we can verify this?

PerlTester

comment created time in 4 days

pull request commentwkhtmltopdf/wkhtmltopdf

Page Orientation V.2019

Sorry, wasn't able to spend time on this project lately. @PerlTester, not sure about this comment you made earlier -- do you plan to incorporate the change in the PR?

PerlTester

comment created time in 4 days

issue commentwkhtmltopdf/wkhtmltopdf

css3 columns is not support

@sinslu Am also facing the same issue. Did you got any solution?

sinslu

comment created time in 4 days

more