dymo-connect-framework icon indicating copy to clipboard operation
dymo-connect-framework copied to clipboard

Dymo Label labels don't work right with Dymo Connect

Open hunkydoryrepair opened this issue 3 years ago • 7 comments

When printing labels created with Dymo Label, for fields that are set as "Shrink to Fit", Dymo Connect prints them in a maximum size font, which cuts off the text.

Here is the object info. It is supposed to shrink the text to fit the bounds, but it simply does not.

<ObjectInfo>
		<TextObject>
			<Name>Set Name</Name>
			<ForeColor Alpha="255" Red="0" Green="0" Blue="0" />
			<BackColor Alpha="0" Red="255" Green="255" Blue="255" />
			<LinkedObjectName />
			<Rotation>Rotation0</Rotation>
			<IsMirrored>False</IsMirrored>
			<IsVariable>False</IsVariable>
			<GroupID>-1</GroupID>
			<IsOutlined>False</IsOutlined>
			<HorizontalAlignment>Center</HorizontalAlignment>
			<VerticalAlignment>Middle</VerticalAlignment>
			<TextFitMode>ShrinkToFit</TextFitMode>
			<UseFullFontHeight>True</UseFullFontHeight>
			<Verticalized>False</Verticalized>
			<StyledText>
				<Element>
					<String xml:space="preserve">MTG Set Name</String>
					<Attributes>
						<Font Family="Arial" Size="48" Bold="True" Italic="False" Underline="False" Strikeout="False" />
						<ForeColor Alpha="255" Red="0" Green="0" Blue="0" HueScale="100" />
					</Attributes>
				</Element>
			</StyledText>
		</TextObject>
		<Bounds X="223" Y="929" Width="2795" Height="784" />
	</ObjectInfo>

With Dymo Connect image

Reverting to the Dymo Label web service, this label appears correct. Using Dymo.WinApi.Win.Host.exe vs 1.3.2 it is unusable.

With Dymo Label image

hunkydoryrepair avatar Nov 02 '21 23:11 hunkydoryrepair

DYMO Connect does not support Shrink to Fit, unfortunately. I've been pushing on this for a long time trying to get it added as we rely on it, too...

dpolivy avatar Nov 02 '21 23:11 dpolivy

The readme states:

"DYMO.Connect.Framework has compatibility with DYMO Label Software and DYMO Connect Software."

So this is false? I guess change to "AlwaysFit" is the only option?

hunkydoryrepair avatar Nov 03 '21 00:11 hunkydoryrepair

The readme states:

"DYMO.Connect.Framework has compatibility with DYMO Label Software and DYMO Connect Software."

So this is false? I guess change to "AlwaysFit" is the only option?

Well, the JS framework works with both the web service from DYMO Label Software and DYMO Connect, so that part is correct. However, the label template has differences between the two software versions, and unfortunately shrink to fit is not supported in DYMO Connect (yet). They try to automatically "translate" the DLS template into the DCD template format, but ignore the fields there aren't equivalents for. DCD does have auto fit, which will either grow or shrink text to fit, so it's not exactly the same.

Unfortunately, there's no way in the current JS framework that I'm aware of to easily determine whether the underlying software is DLS or DCD (that's another feature request I have with them), but really the only workaround is to have separate label templates for DCD and DLS.

dpolivy avatar Nov 03 '21 00:11 dpolivy

This is the only one I've run into where it didn't translate. I think Auto Fit (alwaysfit in the xml) can be made equivalent by changing the size of the object. Since dealing just with single line text, we can make the maximum font size based on the extent of the rectangle, rather than the specified font size.

hunkydoryrepair avatar Nov 03 '21 00:11 hunkydoryrepair

@hunkydoryrepair If you can make auto fit work for you, then you should be OK. In our case, we have variable amount of text that changes per-label so it can cause the font size to grow beyond what we would want in certain cases.

dpolivy avatar Nov 03 '21 16:11 dpolivy

yes, we have variable text, too, and the AutoFit results in things being big when the text is too short. But as long as we do single line text, the height of the object limits it. As far as I know, you can't wrap text anyway.

There does seem to be a way to determine if DLS or DCD is running. If you load a label known to be a DLS label, you can test if it is a DCD label after running. If it is, then DCD is running, otherwise DLS is running. A bit of a kludge, but if you have both labels, load the DLS first, then if isDCDlabel returns true, load the DCD instead.

hunkydoryrepair avatar Nov 04 '21 02:11 hunkydoryrepair

yes, we have variable text, too, and the AutoFit results in things being big when the text is too short. But as long as we do single line text, the height of the object limits it. As far as I know, you can't wrap text anyway.

Correct, no wrapping is what makes the lack of shrink to fit annoying.

There does seem to be a way to determine if DLS or DCD is running. If you load a label known to be a DLS label, you can test if it is a DCD label after running. If it is, then DCD is running, otherwise DLS is running. A bit of a kludge, but if you have both labels, load the DLS first, then if isDCDlabel returns true, load the DCD instead.

You are correct, that would work. Pretty annoying workaround for what should be a simple single API call, though 😄

dpolivy avatar Nov 04 '21 03:11 dpolivy