Skip to content

Cannot add logo before content #9

Description

@dgofman

I need to generate PDF with logo on top. Looks like bug in your code I can only add after some content text. Also I can only set width and height how about padding/position (top/left)

lxDocument.addImage('content', './logo.png');

lxDocument.addImage('header', './logo.png');

lxDocument.addImage('content', './logo.png', {top:0});

Workaround create patch on line 1025

var imgData = PDFImage.open(entry.image.filename),
imgHeight = options.height || imgData.height,
reqPageBreak = (sectionInfo.topIndex + imgHeight > sectionDimension.height),
imageTop = options.top === undefined ? reqPageBreak ? sectionDimension.top || 0 : null : options.top;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions