Skip to content

Support appending pre-encoded data when serializing#510

Merged
ctalkington merged 4 commits into
ctalkington:masterfrom
dellorogiulio:master
May 18, 2024
Merged

Support appending pre-encoded data when serializing#510
ctalkington merged 4 commits into
ctalkington:masterfrom
dellorogiulio:master

Conversation

@dellorogiulio
Copy link
Copy Markdown
Contributor

Hi @ctalkington, seems I figured out how to print a document using this library. I found a missing part comparing your source with sealsystems/node-ipp.

In sealsystems lib, they used a 'custom' data attribute in which they set the file data (see this example) and then they add the 'already-byte' data directly to the encoded message.

so in your `serializer.py', it is needed a

encoded +=  data['data']

just before returning encoded.

In my test, a pdf file is correctly printed.

Let me know if you intend to update this library or if I need to use my fork (i need to use this library without patching the source)

@codecov
Copy link
Copy Markdown

codecov Bot commented May 16, 2024

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 94.49%. Comparing base (e626e4e) to head (8b658f9).

Files Patch % Lines
src/pyipp/serializer.py 0.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #510      +/-   ##
==========================================
- Coverage   94.71%   94.49%   -0.23%     
==========================================
  Files           9        9              
  Lines         851      853       +2     
  Branches      130      131       +1     
==========================================
  Hits          806      806              
- Misses         19       20       +1     
- Partials       26       27       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ctalkington ctalkington added the enhancement Enhancement of the code, not introducing new features. label May 18, 2024
@ctalkington ctalkington changed the title add print_job data Support submission of pre-encoded data May 18, 2024
@ctalkington ctalkington changed the title Support submission of pre-encoded data Support appending pre-encoded data when serializing May 18, 2024
Comment thread src/pyipp/serializer.py Outdated
Comment thread src/pyipp/serializer.py Outdated
@ctalkington ctalkington merged commit 2bfeafa into ctalkington:master May 18, 2024
@so-saf so-saf mentioned this pull request Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Enhancement of the code, not introducing new features.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants