Skip to content
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

Remove hard coded attributes in Text Element #29

Merged
merged 2 commits into from
Oct 14, 2019

Conversation

LagTag
Copy link
Collaborator

@LagTag LagTag commented Oct 27, 2018

This PR should resolve #28 and add the currently hard coded attributes for the FB. I have kept the default value of 4 for max_lines in case any legacy code was relying on that.

  label = Zebra::Zpl::Label.new(
        :width         => 800,
        :length        => 800,
        :print_speed   => 6,
        :print_density => 5,
        :copies        => 1
      )

 label_fed_number = Zebra::Zpl::Text.new(
        :data           => ("FEDERAL RN#90630 ONT. REG.# 34333"),
        :position       => [200, 600],
        :justification  => Zebra::Zpl::Justification::LEFT,
        :font_size      => Zebra::Zpl::FontSize::SIZE_2,
        :width          => 200,
        :max_lines      => 3,
        :line_spacing   => 3,
        :hanging_indent => 20
      )
label << label_fed_number
label.dump_contents
>>^XA^LL800^LH0,0^LS10^PW800^PR6^FWN^CF0,22^CI28^FO200,600^FB800,3,3,L,20^FDFEDERAL RN#90630 ONT. REG.# 34333^FS^PQ1^XZ

@mtking2 mtking2 merged commit 23e06e0 into bbulpett:master Oct 14, 2019
@mtking2 mtking2 added this to the Version 1.1.0 milestone Oct 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Field Block Hard Coded Attributes
2 participants