Make codestring/optionstring hexilified

Create issue
Issue #18 resolved
Yasushi Masuda repo owner created an issue

At , Terry said:

Might I suggest modifying the invocation of BWIPP so that the PostScript uses hex strings <> for the data and options fields rather than normal strings ().

0 0 moveto ... <{hexdata}> <{hexoptions}> /{encoder} / findresource exec

Comments (4)

  1. Terry Burton

    I suggest the following:

    import binascii, textwrap
    string = 'test testtesttesttest test test testtesttest test \n sdfojsodfj oij 3240987u098rusipdjf948325u test'
    wrapper=textwrap.TextWrapper(subsequent_indent=' ', width=72)
    print wrapper.fill('<' + binascii.hexlify(string) + '>')

    This generates neatly indented output as follows:

  2. Log in to comment