Skip to content

SetSourceStream should not require a pointer to an interface #15

@bindermuehle

Description

@bindermuehle

I don't understand the reason for SetSourceStream to require a pointer to an interface.
the method signature should be
rs io.ReadSeeker
instead of
rs *io.ReadSeeker

a conversion to the interface would then not be necessary anymore as NewReader already implements the ReaderSeeker interface.

rs := bytes.NewReader(pdfBytes) tpl1 := gofpdi.ImportPageFromStream(pdf, rs, 1, "/TrimBox")
Let me know if you want me to create a pull request for this. I understand that this is a rather tedious issue since it actually breaks the interface and would mean this library and the gofpdf and gopdf library would have to release a new major version I suppose.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions