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

weasyprint.exe v61.0: cannot use unpack() on <cdata 'char *' NULL> #2079

Closed
ealib opened this issue Feb 21, 2024 · 36 comments
Closed

weasyprint.exe v61.0: cannot use unpack() on <cdata 'char *' NULL> #2079

ealib opened this issue Feb 21, 2024 · 36 comments
Labels
crash Problems preventing documents from being rendered
Milestone

Comments

@ealib
Copy link

ealib commented Feb 21, 2024

End user who is not familiar with WeasyPrint and has only tried it because a handy weasyprint.exe is available.

The test was done with a very complex input (on Windows 10):

C:\weasyprint\dist>weasyprint.exe https://nodejs.org/docs/latest/api/all.html Node_v21.6.2_documentation.pdf

but it died prematurely with a fatal error:

Traceback (most recent call last):
  File "weasyprint\__main__.py", line 190, in <module>
  File "weasyprint\__main__.py", line 183, in main
  File "weasyprint\__init__.py", line 259, in write_pdf
  File "weasyprint\document.py", line 390, in write_pdf
  File "weasyprint\pdf\__init__.py", line 192, in generate_pdf
  File "weasyprint\document.py", line 99, in paint
  File "weasyprint\draw.py", line 65, in draw_page
  File "weasyprint\draw.py", line 174, in draw_stacking_context
  File "weasyprint\draw.py", line 174, in draw_stacking_context
  File "weasyprint\draw.py", line 167, in draw_stacking_context
  File "weasyprint\draw.py", line 1028, in draw_inline_level
  File "weasyprint\draw.py", line 1076, in draw_text
  File "weasyprint\draw.py", line 1172, in draw_first_line
  File "weasyprint\pdf\stream.py", line 346, in add_font
  File "weasyprint\pdf\stream.py", line 27, in __init__
  File "cffi\api.py", line 335, in unpack
RuntimeError: cannot use unpack() on <cdata 'char *' NULL>
[10792] Failed to execute script '__main__' due to unhandled exception!
@LukeBriton
Copy link

LukeBriton commented Mar 3, 2024

Same here, WeasyPrint version 61.1 exe on Windows 10 x64, when I try to convert a local .html file to .pdf this also happens.

@liZe
Copy link
Member

liZe commented Mar 4, 2024

Hi!

We tried to render the first document on our Windows 11 VM, and everything worked correctly.

@ealib @LukeBriton Do you have this problem with a simple document? Could you also test with Windows 11 to see if it works?

@liZe
Copy link
Member

liZe commented Mar 4, 2024

(Maybe related to harfbuzz/harfbuzz#3752.)

@LukeBriton
Copy link

@liZe I tried a very simple html file as this one:

image

Still the same runtime error it has got.

image

@LukeBriton
Copy link

Sorry that I don't have access to Win11 for the moment, this is still on Win10.

@liZe
Copy link
Member

liZe commented Mar 18, 2024

One more question: are your Windows 10 versions up to date?

@LukeBriton
Copy link

Mine is not the newest, it's Windows 10 19042.1237.

@liZe
Copy link
Member

liZe commented Mar 24, 2024

I suspect that the problem has been introduced and then fixed with a Windows update. The way it appeared and disappeared in harfbuzz/harfbuzz#3752, without anything changing in Harfbuzz code, may be the result of a change in the Windows version used to build Harfbuzz in MinGW, or on GitHub CI.

Do you have the possibility to update your version of Windows 10?

@ScottProkopetz
Copy link

I'm using WeasyPrint 61.2 on Windows 11 with the latest Windows update 23H2 build: 22631.3296 and I have the same issue. Is there a fix for this?

@liZe
Copy link
Member

liZe commented Apr 3, 2024

I'm using WeasyPrint 61.2 on Windows 11 with the latest Windows update 23H2 build: 22631.3296 and I have the same issue. Is there a fix for this?

Then the problem doesn’t come from the Windows version…

There’s no fix yet. We’ll probably have to generate debugging exe files to understand what’s going on.

Until then, you can probably help. Could you please try to render files like this one:

<html style="font-family: Arial">test</html>

trying different well-known Microsoft font faces, and see if you can render at least some of them? That would be really helpful.

@ScottProkopetz
Copy link

That sample fails as well. I tried many different fonts and none worked. But I don't think it is the font that is the issue, as soon as you have any content in the document, it fails.

For example:

This renders a blank page without errors:

<html style="font-family: Arial">
	<head>
		<meta charset="utf-8" />
		<title>Test</title>
	</head>
	<body>
	</body>
</html>

But this causes the error we've described:

<html style="font-family: Arial">
	<head>
		<meta charset="utf-8" />
		<title>Test</title>
	</head>
	<body>
		<p>Test</p>
	</body>
</html>

This is the command I used, and the result is this error -- notice how step 2 it identified a CSS string even though I passed in an external stylesheet file (stylesheet.css):

C:\Dev\HtmlToPdfSample\weasyprint\dist>weasyprint.exe -s stylesheet.css --verbose sample.html sample.pdf
INFO: Step 1 - Fetching and parsing HTML - sample.html
INFO: Step 2 - Fetching and parsing CSS - CSS string
INFO: Step 3 - Applying CSS
INFO: Step 4 - Creating formatting structure
INFO: Step 5 - Creating layout - Page 1
INFO: Step 6 - Creating PDF
Traceback (most recent call last):
  File "weasyprint\__main__.py", line 190, in <module>
  File "weasyprint\__main__.py", line 183, in main
  File "weasyprint\__init__.py", line 259, in write_pdf
  File "weasyprint\document.py", line 390, in write_pdf
  File "weasyprint\pdf\__init__.py", line 192, in generate_pdf
  File "weasyprint\document.py", line 99, in paint
  File "weasyprint\draw.py", line 65, in draw_page
  File "weasyprint\draw.py", line 174, in draw_stacking_context
  File "weasyprint\draw.py", line 167, in draw_stacking_context
  File "weasyprint\draw.py", line 1028, in draw_inline_level
  File "weasyprint\draw.py", line 1076, in draw_text
  File "weasyprint\draw.py", line 1172, in draw_first_line
  File "weasyprint\pdf\stream.py", line 346, in add_font
  File "weasyprint\pdf\stream.py", line 27, in __init__
  File "cffi\api.py", line 335, in unpack
RuntimeError: cannot use unpack() on <cdata 'char *' NULL>
[32108] Failed to execute script '__main__' due to unhandled exception!

Note: Both the sample.html and the stylesheet.css files were placed in the dist folder, but I also tried referencing the stylesheet with a concrete path and tried specifying the stylesheet in the html document directly. I've tried with a stylesheet and without. Nothing seems to make a difference. It fails if anything is in the body of the document.

@liZe
Copy link
Member

liZe commented Apr 3, 2024

notice how step 2 it identified a CSS string even though I passed in an external stylesheet file (stylesheet.css)

That’s another unrelated issue you can open! 😄

But I don't think it is the font that is the issue, as soon as you have any content in the document, it fails.

The problem happens when a font is loaded, but it’s not related to a specific font.

Could you please try the executable generated here? It contains extra debugging information that could be helpful, and a minor change to check that the problem we have is not caused by this problem.

@ScottProkopetz
Copy link

Thanks for that quick turnaround. Here are the outputs from 4 different tests:

No stylesheet and no internal styles:

C:\Dev\HtmlToPdfSample\weasyprint-diagnostic-version\dist>weasyprint.exe --verbose sample.html sample.pdf
INFO: Step 1 - Fetching and parsing HTML - sample.html
INFO: Step 3 - Applying CSS
INFO: Step 4 - Creating formatting structure
INFO: Step 5 - Creating layout - Page 1
INFO: Step 6 - Creating PDF
text 'This is a test '
font description b'Times New Roman, 16'
Traceback (most recent call last):
  File "weasyprint\__main__.py", line 190, in <module>
  File "weasyprint\__main__.py", line 183, in main
  File "weasyprint\__init__.py", line 259, in write_pdf
  File "weasyprint\document.py", line 391, in write_pdf
  File "weasyprint\pdf\__init__.py", line 189, in generate_pdf
  File "weasyprint\document.py", line 99, in paint
  File "weasyprint\draw.py", line 65, in draw_page
  File "weasyprint\draw.py", line 168, in draw_stacking_context
  File "weasyprint\draw.py", line 161, in draw_stacking_context
  File "weasyprint\draw.py", line 1022, in draw_inline_level
  File "weasyprint\draw.py", line 1070, in draw_text
  File "weasyprint\draw.py", line 1167, in draw_first_line
  File "weasyprint\pdf\stream.py", line 348, in add_font
  File "weasyprint\pdf\stream.py", line 25, in __init__
  File "cffi\api.py", line 335, in unpack
RuntimeError: cannot use unpack() on <cdata 'char *' NULL>
[37376] Failed to execute script '__main__' due to unhandled exception!

Stylesheet and no internal styles:

C:\Dev\HtmlToPdfSample\weasyprint-diagnostic-version\dist>weasyprint.exe -s stylesheet.css --verbose sample.html sample.pdf
INFO: Step 1 - Fetching and parsing HTML - sample.html
INFO: Step 2 - Fetching and parsing CSS - CSS string
INFO: Step 3 - Applying CSS
INFO: Step 4 - Creating formatting structure
INFO: Step 5 - Creating layout - Page 1
INFO: Step 6 - Creating PDF
text 'This is a test '
font description b'Arial 12'
Traceback (most recent call last):
  File "weasyprint\__main__.py", line 190, in <module>
  File "weasyprint\__main__.py", line 183, in main
  File "weasyprint\__init__.py", line 259, in write_pdf
  File "weasyprint\document.py", line 391, in write_pdf
  File "weasyprint\pdf\__init__.py", line 189, in generate_pdf
  File "weasyprint\document.py", line 99, in paint
  File "weasyprint\draw.py", line 65, in draw_page
  File "weasyprint\draw.py", line 168, in draw_stacking_context
  File "weasyprint\draw.py", line 161, in draw_stacking_context
  File "weasyprint\draw.py", line 1022, in draw_inline_level
  File "weasyprint\draw.py", line 1070, in draw_text
  File "weasyprint\draw.py", line 1167, in draw_first_line
  File "weasyprint\pdf\stream.py", line 348, in add_font
  File "weasyprint\pdf\stream.py", line 25, in __init__
  File "cffi\api.py", line 335, in unpack
RuntimeError: cannot use unpack() on <cdata 'char *' NULL>
[2740] Failed to execute script '__main__' due to unhandled exception!

Internal style only, <html style="font-family: Arial">

C:\Dev\HtmlToPdfSample\weasyprint-diagnostic-version\dist>weasyprint.exe --verbose sample.html sample.pdf
INFO: Step 1 - Fetching and parsing HTML - sample.html
INFO: Step 3 - Applying CSS
INFO: Step 4 - Creating formatting structure
INFO: Step 5 - Creating layout - Page 1
INFO: Step 6 - Creating PDF
text 'This is a test '
font description b'Arial 16'
Traceback (most recent call last):
  File "weasyprint\__main__.py", line 190, in <module>
  File "weasyprint\__main__.py", line 183, in main
  File "weasyprint\__init__.py", line 259, in write_pdf
  File "weasyprint\document.py", line 391, in write_pdf
  File "weasyprint\pdf\__init__.py", line 189, in generate_pdf
  File "weasyprint\document.py", line 99, in paint
  File "weasyprint\draw.py", line 65, in draw_page
  File "weasyprint\draw.py", line 168, in draw_stacking_context
  File "weasyprint\draw.py", line 161, in draw_stacking_context
  File "weasyprint\draw.py", line 1022, in draw_inline_level
  File "weasyprint\draw.py", line 1070, in draw_text
  File "weasyprint\draw.py", line 1167, in draw_first_line
  File "weasyprint\pdf\stream.py", line 348, in add_font
  File "weasyprint\pdf\stream.py", line 25, in __init__
  File "cffi\api.py", line 335, in unpack
RuntimeError: cannot use unpack() on <cdata 'char *' NULL>
[24444] Failed to execute script '__main__' due to unhandled exception!

Stylesheet defined in html <link rel="stylesheet" href="stylesheet.css" />

C:\Dev\HtmlToPdfSample\weasyprint-diagnostic-version\dist>weasyprint.exe --verbose sample.html sample.pdf
INFO: Step 1 - Fetching and parsing HTML - sample.html
INFO: Step 2 - Fetching and parsing CSS - file:///C:/Dev/HtmlToPdfSample/weasyprint-diagnostic-version/dist/stylesheet.css
INFO: Step 3 - Applying CSS
INFO: Step 4 - Creating formatting structure
INFO: Step 5 - Creating layout - Page 1
INFO: Step 6 - Creating PDF
text 'This is a test '
font description b'Arial 12'
Traceback (most recent call last):
  File "weasyprint\__main__.py", line 190, in <module>
  File "weasyprint\__main__.py", line 183, in main
  File "weasyprint\__init__.py", line 259, in write_pdf
  File "weasyprint\document.py", line 391, in write_pdf
  File "weasyprint\pdf\__init__.py", line 189, in generate_pdf
  File "weasyprint\document.py", line 99, in paint
  File "weasyprint\draw.py", line 65, in draw_page
  File "weasyprint\draw.py", line 168, in draw_stacking_context
  File "weasyprint\draw.py", line 161, in draw_stacking_context
  File "weasyprint\draw.py", line 1022, in draw_inline_level
  File "weasyprint\draw.py", line 1070, in draw_text
  File "weasyprint\draw.py", line 1167, in draw_first_line
  File "weasyprint\pdf\stream.py", line 348, in add_font
  File "weasyprint\pdf\stream.py", line 25, in __init__
  File "cffi\api.py", line 335, in unpack
RuntimeError: cannot use unpack() on <cdata 'char *' NULL>
[38592] Failed to execute script '__main__' due to unhandled exception!

Contents of stylesheet.css

body {
  margin: 0;
  font-family: Arial;
  font-size: 12px;
  font-style: normal;
} 

@page {
  margin: 1em;
  size: Letter portrait;
}

@liZe
Copy link
Member

liZe commented Apr 3, 2024

😒

Could you please try this document?

<html style="font-family: claritycity">
  <style>
    @font-face {
      font-family: claritycity;
      src: url(https://www.courtbouillon.org/static/fonts/ClarityCity-Regular.woff2);
    }
  </style>
  test
</html>

@ScottProkopetz
Copy link

ScottProkopetz commented Apr 3, 2024

That one failed as well:

C:\Dev\HtmlToPdfSample\weasyprint-diagnostic-version\dist>weasyprint.exe --verbose sample2.html sample2.pdf
INFO: Step 1 - Fetching and parsing HTML - sample2.html
INFO: Step 2 - Fetching and parsing CSS - CSS string
INFO: Step 3 - Applying CSS
INFO: Step 4 - Creating formatting structure
INFO: Step 5 - Creating layout - Page 1
INFO: Step 6 - Creating PDF
text 'test '
font description b'claritycity 16'
Traceback (most recent call last):
  File "weasyprint\__main__.py", line 190, in <module>
  File "weasyprint\__main__.py", line 183, in main
  File "weasyprint\__init__.py", line 259, in write_pdf
  File "weasyprint\document.py", line 391, in write_pdf
  File "weasyprint\pdf\__init__.py", line 189, in generate_pdf
  File "weasyprint\document.py", line 99, in paint
  File "weasyprint\draw.py", line 65, in draw_page
  File "weasyprint\draw.py", line 168, in draw_stacking_context
  File "weasyprint\draw.py", line 161, in draw_stacking_context
  File "weasyprint\draw.py", line 1022, in draw_inline_level
  File "weasyprint\draw.py", line 1070, in draw_text
  File "weasyprint\draw.py", line 1167, in draw_first_line
  File "weasyprint\pdf\stream.py", line 348, in add_font
  File "weasyprint\pdf\stream.py", line 25, in __init__
  File "cffi\api.py", line 335, in unpack
RuntimeError: cannot use unpack() on <cdata 'char *' NULL>
[35512] Failed to execute script '__main__' due to unhandled exception!

Sorry, if you read the initial comment before I edited it, I had created the new html file in the wrong location -- this is the run after I moved it into the correct location.

@liZe
Copy link
Member

liZe commented Apr 3, 2024

No such file or directory: 'sample2.html'

Are you sure that your sample2.html file is in C:\Dev\HtmlToPdfSample\weasyprint-diagnostic-version\dist?

@ScottProkopetz
Copy link

Yeah sorry, as soon as I saved the comment I realize I had created it in the wrong location ... I just updated that comment with the proper output from the run.

@ScottProkopetz
Copy link

ScottProkopetz commented Apr 3, 2024

Is that 'b' in preceding the font description (in the output) just part of the trace statement you're printing or is it created by the conversion code and relating to the issue?

text 'test '
font description b'claritycity 16'

@liZe
Copy link
Member

liZe commented Apr 3, 2024

Thanks a lot for your patience.

Is that 'b' in preceding the font (in the output) just part of the trace statement you're printing or is it created by the conversion code and relating to the issue?

It’s a bytestring and not a string, that’s why we have the 'b' before. There’s no problem here.

One last question: could you please try the executable from this action? You can just test one sample, there’s no need to test them all.

The next step will probably be to write some C code to see if we can reproduce with simple Pango/Harfbuzz code. To be honest, I don’t know if/when I’ll be able to do this.

I have no idea why I can’t reproduce this error on my Windows VM. It’s probably not related to the executable, as it was already seen in harfbuzz/harfbuzz#3752. If you have any idea why your Windows installation is different from mine, or why it appeared/disappeared for WeasyPrint’s tests on Windows, that may help.

@ScottProkopetz
Copy link

ScottProkopetz commented Apr 3, 2024

Here's the results of the same file run with the executable you provided in that link:

C:\Dev\HtmlToPdfSample\weasyprint-diagnostic-version2\dist>weasyprint.exe --verbose sample2.html sample2.pdf
INFO: Step 1 - Fetching and parsing HTML - sample2.html
INFO: Step 2 - Fetching and parsing CSS - CSS string
INFO: Step 3 - Applying CSS
INFO: Step 4 - Creating formatting structure
INFO: Step 5 - Creating layout - Page 1
INFO: Step 6 - Creating PDF
text 'test '
font description b'claritycity 16'
font <cdata 'hb_font_t *' 0x000001F937A38050>
face <cdata 'hb_face_t *' 0x00007FFFEFBF43E0>
blob <cdata 'hb_blob_t *' 0x00007FF871399F10>
length 0
Traceback (most recent call last):
  File "weasyprint\__main__.py", line 190, in <module>
  File "weasyprint\__main__.py", line 183, in main
  File "weasyprint\__init__.py", line 259, in write_pdf
  File "weasyprint\document.py", line 391, in write_pdf
  File "weasyprint\pdf\__init__.py", line 189, in generate_pdf
  File "weasyprint\document.py", line 99, in paint
  File "weasyprint\draw.py", line 65, in draw_page
  File "weasyprint\draw.py", line 168, in draw_stacking_context
  File "weasyprint\draw.py", line 161, in draw_stacking_context
  File "weasyprint\draw.py", line 1022, in draw_inline_level
  File "weasyprint\draw.py", line 1070, in draw_text
  File "weasyprint\draw.py", line 1167, in draw_first_line
  File "weasyprint\pdf\stream.py", line 351, in add_font
  File "weasyprint\pdf\stream.py", line 29, in __init__
  File "cffi\api.py", line 335, in unpack
RuntimeError: cannot use unpack() on <cdata 'char *' NULL>
[21748] Failed to execute script '__main__' due to unhandled exception!

To answer your question, I don't know why it worked for you but not for me. I'm running the following:

  • Windows 11 Pro Version 23H2
  • OS build 22631.3296
  • 64-bit Operating System
  • 12th Gen Intel(R) Core(TM) i7-12700K 3.60 GHz
  • 32.0 GB (31.7 GB usable) RAM

I am running under normal user privileges, not an administrator account. But yes, I did try running from a command prompt with elevated privileges and it made no difference ... same errors.

Let me know if there's anything else I can do to help (other than loading the Python source, I think I have Python installed but haven't written anything with it and no plans to do so at this point).

UPDATE: I doubt this has any effect on the Windows executable, but I do have Python 3.9.13 (64-bit) installed on this machine.

@ScottProkopetz
Copy link

The only thing I can think of that may be different is if your VM instance is a 32-bit operating system instead of 64-bit or maybe an earlier build of Windows 11 ??

@ScottProkopetz
Copy link

@liZe As far as why the tests appeared to run fine, I don't know. But I have a question.
In test_pdf.py why does line 26 not include both closing '}' and '</style>' tags?

in the version I'm looking at, it appears as:
pdf = FakeHTML(string='<style>@page{size:3in 4in').write_pdf(zoom=zoom)
but shouldn't it be?
pdf = FakeHTML(string='<style>@page{size:3in 4in}</style>').write_pdf(zoom=zoom)

or does the write_pdf() method close them automatically?

@liZe
Copy link
Member

liZe commented Apr 5, 2024

But I have a question.
In test_pdf.py why does line 26 not include both closing '}' and '</style>' tags?

We test valid and invalid HTML and CSS, and invalid doesn’t mean undefined behaviour. For this specific case, <style>@page{size:3in 4in has to be equivalent to <style>@page{size:3in 4in}</style> according to the HTML and CSS specifications, so we test this invalid syntax and check both that 1) the invalid string is equivalent to the valid sting, and 2) the string does what it’s supposed to do. We use "strange" syntaxes in many other tests too.

@liZe
Copy link
Member

liZe commented Apr 5, 2024

The only thing I can think of that may be different is if your VM instance is a 32-bit operating system instead of 64-bit or maybe an earlier build of Windows 11 ??

My VM is 64-bit. We’ve asked other Windows users to try and it works for them too.

@liZe
Copy link
Member

liZe commented Apr 5, 2024

Here’s a small C program:

#include <harfbuzz/hb.h>
#include <fontconfig/fontconfig.h>
#include <pango/pango.h>
#include <pango/pangoft2.h>

int main() {
    unsigned int *length;

    FcConfig *config = FcInitLoadConfigAndFonts();
    PangoFontMap *font_map = pango_ft2_font_map_new();
    pango_fc_font_map_set_config((PangoFcFontMap *)font_map, config);
    FcConfigDestroy(config);

    PangoFontDescription *font_description = pango_font_description_new();
    pango_font_description_set_family(font_description, "Arial");
    pango_font_description_set_style(font_description, PANGO_STYLE_NORMAL);
    pango_font_description_set_stretch(font_description, PANGO_STRETCH_NORMAL);
    pango_font_description_set_weight(font_description, PANGO_WEIGHT_NORMAL);
    pango_font_description_set_absolute_size(font_description, 20);

    PangoContext *context = pango_font_map_create_context(font_map);
    PangoLayout *layout = pango_layout_new(context);
    pango_layout_set_font_description(layout, font_description);
    pango_layout_set_text(layout, "test", -1);

    PangoLayoutLine *line = pango_layout_get_line_readonly(layout, 0);
    PangoGlyphItem *data = line->runs[0].data;
    PangoFont *pango_font = data->item->analysis.font;
    hb_font_t *hb_font = pango_font_get_hb_font(pango_font);
    hb_face_t *hb_face = hb_font_get_face(hb_font);
    hb_blob_t *hb_blob = hb_face_reference_blob(hb_face);
    const unsigned char *blob_data = hb_blob_get_data(hb_blob, length);
    printf("blob:\n");
    for (unsigned int i = 0; i < *length; ++i) {
        printf("%02X ", blob_data[i]);
    }
    printf("\n");
    printf("length: %u", *length);
    printf("\n");
}

If someone could compile and launch it on Windows, that would be wonderful. You can probably use MSYS2 for that.

@grewn0uille grewn0uille added the crash Problems preventing documents from being rendered label Apr 9, 2024
@liZe
Copy link
Member

liZe commented Apr 10, 2024

Please try the executable generated here: https://github.com/Kozea/WeasyPrint/actions/runs/8638522705

@LukeBriton
Copy link

Please try the executable generated here: https://github.com/Kozea/WeasyPrint/actions/runs/8638522705

I tried this, it's runable, yet it didn't output anything. I suppose this isn't the expected output.

@liZe
Copy link
Member

liZe commented Apr 18, 2024

I tried this, it's runable, yet it didn't output anything. I suppose this isn't the expected output.

You should get the blob (a lot of hexadecimal characters) and the length printed. Does it crash?

@LukeBriton
Copy link

I tried this, it's runable, yet it didn't output anything. I suppose this isn't the expected output.

You should get the blob (a lot of hexadecimal characters) and the length printed. Does it crash?

image

Nothing happened except my cursor being busy for seconds.

@liZe
Copy link
Member

liZe commented Apr 18, 2024

Nothing happened except my cursor being busy for seconds.

Could you please try the latest version? You’ll also need to download and unzip these dlls in the same folder as the executable file.

@liZe
Copy link
Member

liZe commented Apr 18, 2024

… and try this new executable too.

@LukeBriton
Copy link

Nothing happened except my cursor being busy for seconds.

Could you please try the latest version? You’ll also need to download and unzip these dlls in the same folder as the executable file.

image

@LukeBriton
Copy link

… and try this new executable too.

I think this works. It exports a pdf successfully.
image

@liZe liZe closed this as completed in 3a208fe Apr 24, 2024
@liZe liZe added this to the 62.0 milestone Apr 24, 2024
@liZe
Copy link
Member

liZe commented Apr 24, 2024

Thanks for taking the time to test everything.

I’ve used a new strategy to retrieve the content of fonts, and it looks like it works everywhere. Please test the latest exe files like this one and report if there’s anything wrong!

@LukeBriton
Copy link

Thanks for taking the time to test everything.

I’ve used a new strategy to retrieve the content of fonts, and it looks like it works everywhere. Please test the latest exe files like this one and report if there’s anything wrong!

Ça va bien. Merci beaucoup.

btw, I suppose these warnings I met are due to the concrete html file? Seems unrelated to this issue, then it's OK.

image

@liZe
Copy link
Member

liZe commented Apr 24, 2024

btw, I suppose these warnings I met are due to the concrete html file? Seems unrelated to this issue, then it's OK.

Yes, that’s just warnings for unsupported CSS properties, you can use the -q option to hide them.

So… It finally works! 🔥

okkays pushed a commit to okkays/WeasyPrint that referenced this issue May 1, 2024
This way seems to work everywhere, including strange Windows computers.

Fix Kozea#2079.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash Problems preventing documents from being rendered
Projects
None yet
Development

No branches or pull requests

5 participants