-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
raw_base64 type #4
Comments
Hi phyzalis, Thanks for the detail and the issue. To answer your questions.
No reason for this that I'm aware of. Before this summer our team didn't have any ruby experience. A ruby client was popularly requested and we were keen to learn so we had a go. It's entirely possible this is error cause by our ruby inexperience.
That would make sense and it's something we definitely should remove. The content types we currently support are 'pdf_uri', 'pdf_base64', 'raw_uri', 'raw_base64'. We'll probably add more in the future as we support more document formats. From a HTTP API design perspective it was a mistake to mix the printjob contentType (e.g. pdf, raw) and contentEncoding (e.g. base64, uri) into one field. So we might address that somehow. If you'd like to submit any pull requests with improvements or modifications we'd be delighted to roll these back into this lib and credit your account with free credit. Let me know if you have any other questions. |
Thank you for your prompt support. I will submit you a pull request soon but maybe some users are using this project this way so it might brake their usage. We will discuss about this later during my pull request |
Late reply but I submitted a PR in September last year for this same issue: #3 (it's had no response) I have been using my branch in production with base64 encoded strings for tens of thousands of print jobs with no issue. |
I've just run into the same issue, and came across this. Now using your repo thanks @rjocoleman |
Bump on this! PrintNode is a fantastic service. We're using it to implement print-from-web support in our warehouse automation software. The current implementation of base64 printing is broken for that use-case, as our labels are being generated by FedEx and UPS as Base64 streams of ZPL, and to make PrintNode printing work we need to decode & write a temporary file, that then gets read and re-encoded. Ugh. This is a super-common reason for using a web-based printing solution, and I won't be the last customer who runs into this issue. |
Just add a PR to address this in a manner similar to @rjocoleman's approach, but providing for backwards compatibility with existing installs. Hope that helps someone! Would appreciate someone from PrintNode approving one of these PR's asap. Cheers! |
Hi, Thanks irongaze. Sorry for delay in merging in the changes. If you make other improvements then we would be really happy to merge them in. Thanks, James |
Thanks for merging the PR, James! Any chance you guys could push a new gem version to RubyGems.org so I can use the official gem instead of my fork? |
I think this can be closed ? |
This issue may be fixed in master but there hasn’t been a release that incorporates this. So current best practice is to use github as the gem source. |
Best practice is to cut a release and publish to rubygems. Cf. #11. Been almost a year since master has been updated. |
Hi,
I was trying to use PrintNode::Client create_printjob with a "raw_base64" content_type.
As written in PrintNode API, I was trying to pass my base64 encoded content through a PrintNode::PrintJob instance but I was getting:
I was surprised to look into the code and see that content seems to have to be a file name when content is a "raw_base64" content_type. Is there a reason why we have to use a file? Isn't it reducing speed by having to create then remove a file?
For now I am going to fork my own version and remove that but could you tell me more about this, if you plan to add something else or not after? If you don't plan to do anything about this (like adding another content_type), maybe you should add something in the documentation about that.
Thank you so much
The text was updated successfully, but these errors were encountered: