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 Block #3

Merged
merged 2 commits into from
Oct 29, 2018

Conversation

LagTag
Copy link

@LagTag LagTag commented Oct 29, 2018

This PR should resolve bbulpett#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 5e157c0 into MWWOnDemand:mww_master Oct 29, 2018
LagTag added a commit that referenced this pull request Aug 21, 2019
All recent changes from MWW
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.

2 participants