Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Guillaume Ayoub
    @liZe
    If you want page numbers, then you want page margins 😀️
    Ciaran Evans
    @ciaranevans-xydus
    Then I lose the HTML 0,0 == PDF 0,0 :laughing:
    Guillaume Ayoub
    @liZe
    You can apply different margin sizes on the different sides if you want
    You can only keep the bottom margin for example, if it’s easier for you
    Ciaran Evans
    @ciaranevans-xydus
    Yeah. That's a good shout. Sorry, I realise this isn't a CSS help thread :P Can you tell I am a backend dev? lol
    Guillaume Ayoub
    @liZe
    No problem 😁️
    (If you remove the right margin, you’ll have to use @bottom-right instead of @bottom-right-corner)
    Ciaran Evans
    @ciaranevans-xydus
    :thumbsup:
    Good shout, merci!
    Guillaume Ayoub
    @liZe
    Avec plaisir !
    Ciaran Evans
    @ciaranevans-xydus
    And a big thank you for the speedy PR as well :heart:
    Lucie Anglade
    @grewn0uille
    Btw, I don’t if you’ve seen it, we launched a survey about WeasyPrint just here https://thym.courtbouillon.org/1 :)
    Ciaran Evans
    @ciaranevans-xydus
    Nice, shall fill it out now!
    Weasyprint was one of the few actual open source licensed libraries we could find
    And I was very glad to go back to python to use it rather than the java day job :')
    Lucie Anglade
    @grewn0uille
    💜 :)
    Ciaran Evans
    @ciaranevans-xydus
    image.png

    Me again with another question :sweat_smile:

    We have table rows with inner tables :grimacing: and on the html preview, I get:

    the above*
    On the PDF, it doesn't seem to respect the spacing
    image.png
    I would expect the columns in the latter image to both take 50% of the right hand column of the main table
    Ciaran Evans
    @ciaranevans-xydus
    ^ A case of pebcak! Just needed to allow word breaking
    Guillaume Ayoub
    @liZe
    :)
    Ciaran Evans
    @ciaranevans-xydus
    Morning folks :D Me again - does weasyprint respect max-height/max-width of images?
    In HTML previews, these tags work, but it seems like the PDF images are always bigger
    image.png
    HTML Preview ^
    image.png
    PDF ^
    With:
    img { max-width: 100%; max-height: 250px; width: auto; height: auto;}
    Guillaume Ayoub
    @liZe
    I think it should work, let me try
    Oh, I think I know what’s happening
    Is the image in a table?
    Ciaran Evans
    @ciaranevans-xydus
    It is
    Guillaume Ayoub
    @liZe
    Then the width of the columns can be different depending on the browser, as it’s not defined by the specification. So, max-width: 100% can give different results, as it depends on the column’s width.
    You can use a smaller max-height if you think that the second photo is too tall.
    Ciaran Evans
    @ciaranevans-xydus
    Well that second image is definitely stretched out
    Joerg Sonnenberger
    @jsonn
    a customer of mine is interested in sending out PDFs with some basic forms (text box, checkboxes) from my application. we don't use weasyprint in that part of the application for HTML->PDF conversion yet, but there are some long term plans in that direction, pending support, of course. so the question is: would this support materialize with throwing some money at the problem and what kind of money would that be? :)
    Lucie Anglade
    @grewn0uille
    Hi @jsonn,
    Currently there is nothing planned to have form support in WeasyPrint, but throwing some money at it would make that happens :) If you’re interesting in sponsoring this feature, can you give us a email adress so we can discuss about it?
    Guillaume Ayoub
    @liZe
    That looks fun, thanks for sharing!
    Thomasb81
    @Thomasb81
    The project use headless chrominium + skia patch to render any html page to svg
    There is some additionnal information in the first issue on the github project.
    Alexander Neilson
    @AlexanderNeilson
    If you are seeing slow generation of reports or significantly larger output files make sure you are running 57.1 and not 57.0. I haven't seen a reference in the changelog to this (but I could easily have missed it) but we had experienced both massively longer generation time and file sizes that resolved after moving to 57.1 from 57.0. (12 page report with 22 images and an SVG logo normally generates in ~20 seconds and file size about 3.5MB was taking ~3 minutes and 20 seconds and was generating a file about 32MB)
    goodwill
    @goodwill
    Hi guys
    just wondering if there is a way for weasyprint to output an image file thats just fit the html raw size, without limiting it with print page canvas (e.g. A4)?
    Alexander Neilson
    @AlexanderNeilson
    if you have your sizes all specified then you could specify the dimensions of the "page" instead of using the set page sizes
    Guillaume Ayoub
    @liZe
    @AlexanderNeilson is right, you can change the page size in the @page block. But if you’re looking for a dynamic page size, it’s not implemented (you can take a look at Kozea/WeasyPrint#193)