You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using ZplAnalyzer to parse a ZPL file, then iterate over its elements like so:
varanalyzer=newZplAnalyzer(printerStorage);varanalyzeInfo=analyzer.Analyze("... my zpl ...");foreach(varlabelInfoinanalyzeInfo.LabelInfos){foreach(varelminlabelInfo.ZplElements){if(elmisZplTextFieldtextElm){if(textElm.Font.FontName=="d"&&(textElm.Font.FontWidth==0||textElm.Font.FontHeight==0)){textElm.Font.FontWidth=20;textElm.Font.FontHeight=20;}}}varimageData=drawer.Draw(labelInfo.ZplElements,labelWidth:101.6,labelHeight:152.4,printDensityDpmm:8);// ...}
However, as-written this would not work because:
The Font property of ZplTextField looks like this:
publicZplFontFont{get;protectedset;}
And further, the properties of ZplFont have private setters:
publicintFontWidth{get;privateset;}
Is there a good reason for this?
I think it would be useful to be able to modify these parameters on existing elements. I can just create new elements and replace the old ones, but that is a little more messy.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am using ZplAnalyzer to parse a ZPL file, then iterate over its elements like so:
However, as-written this would not work because:
Is there a good reason for this?
I think it would be useful to be able to modify these parameters on existing elements. I can just create new elements and replace the old ones, but that is a little more messy.
Beta Was this translation helpful? Give feedback.
All reactions