Skip to content

ArgumentNullException thrown when RTF document contains a horizontal line (repro code linked) #102

@thomas-hori

Description

@thomas-hori

Minimal reproduction and workaround: https://github.com/megaslice/P1-RtfPipe-ArgumentNullException-repro

ImageUriGetter gets invoked with an argument with its Bytes property set to null.  The default implementation of ImageUriGetter, i.e. DataUri, passes picture.Bytes straight to Convert.ToBase64String which, in turn, throws ArgumentNullException.

Ideally, one would expect the fHorizRule RTF \picprop property to be recognised and thus generate an HTML <hr> (rather than an <img>).  At minimum, however, one would expect either that DataUri be able to handle picture.Bytes being null, or else that ImageUriGetter never be invoked with an argument whose Bytes property is null.

CC @coudy

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