Git Product home page Git Product logo

Comments (2)

golumn avatar golumn commented on August 19, 2024

The following changes to context.py seem to fix this issue. I have proposed a change to the file and submitted it. Here is a diff of my changes. https://github.com/chrisglass/xhtml2pdf/pull/32/files
@@ -184,10 +184,10 @@ def _pisaAddFrame(self, name, data, first=False, border=None, size=(0,0)):
184 184
#if not (w and h):
185 185
# return None
186 186
if first:
187

  •        return (name, None, data.get("-pdf-frame-border", border), x, y, w, h)
    
    187
  •        return (name, None, data.get("-pdf-frame-border", border), x, y, w, h, data)
    
    188 188

189 189
return (name, data.get("-pdf-frame-content", None),
190

  •            data.get("-pdf-frame-border", border), x, y, w, h)
    
    190
  •            data.get("-pdf-frame-border", border), x, y, w, h, data)
    
    191 191

192 192
def atPage(self, name, pseudopage, declarations):
193 193
c = self.c
... ...
@@ -246,7 +246,10 @@ def atPage(self, name, pseudopage, declarations):
246 246
# Frames have to be calculated after we know the pagesize
247 247
frameList = []
248 248
staticList = []
249

  •    for fname, static, border, x, y, w, h in c.frameList:
    
    249
  •    for fname, static, border, x, y, w, h, fdata in c.frameList:
    
    250
  •        #fix frame sizing problem.
    
    251
  •        if static:
    
    252
  •            x, y, w, h = getFrameDimensions(fdata, c.pageSize[0], c.pageSize[1])
    
    250 253
    x, y, w, h = getCoords(x, y, w, h, c.pageSize)
    251 254
    if w <= 0 or h <= 0:
    252 255
    log.warn(self.c.warning("Negative width or height of frame. Check @frame definitions."))

from xhtml2pdf.

benjaoming avatar benjaoming commented on August 19, 2024

Reported issue cannot be confirmed anymore.

from xhtml2pdf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.