-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Resolves #4708 - adding transparent background support to barcode #5385
Resolves #4708 - adding transparent background support to barcode #5385
Conversation
Want to follow this up with a quick note, that it is discouraged to output barcodes that are NOT black on white. They may still work with your scanner though. |
@steverhoades We deprecated ZendPdf with ZF2; too difficult to maintain, as the spec is constantly evolving, and it's a very difficult thing to get the various features right. We do have the old Barcode documentation -- I suspect it's simply not linked in the TOC and/or index, which is why you cannot see it in the rendered manual. |
@steverhoades Any chance I can get some unit tests? |
@weierophinney Actually, I think I may have been wrong with with the documentation, it may be in 2. Should we remove the PDF Renderer for barcode? I'll work on getting some unit tests in to support this. |
@steverhoades Let's deprecate the PDF renderer for the next minor revision (2.3.0), and then we can remove in 3. |
* Will work for SVG and Image (png and gif only) | ||
* | ||
* @param $bool | ||
* @return $this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return self
@steverhoades Any chance of getting this completed soon? |
Matthew, So sorry! Been on vacation with the Family for the Holidays. I'll look at Happy New Year! Steve On Fri, Jan 3, 2014 at 1:55 PM, weierophinney [email protected]:
|
Matthew, Better late than never, just added the unit tests for the new feature to Steve On Wed, Jan 8, 2014 at 8:41 AM, Steve Rhoades [email protected] wrote:
|
…nt solution chosen.
…is isn't working as intended.
… to fail, need to run transparency test first.
… to fail, additional refactor
$backgroundColor & 0x0000FF | ||
); | ||
|
||
if($this->getImageType() != "jpeg" && $this->transparentBackground) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a comment explaining why jpeg is excluded here.
@steverhoades Fix the CS and ready to merge :) |
There are currently no tests for this, the code in general here could probably be cleaned up a bit. Also, I have noticed that there is currently no 2.0 documentation on Barcode and ZendPdf doesn't exist.
Example Usage for Image:
Example Usage for SVG: