androidsdkepson

Epson Android SDK Print Error! Illegal form data


for anyone designing their custom app to support label printing with Epson SDK, I have questions to ask.

Currently, I am using LW-600 and during the development of my app, I kept receiving com.epson.lwprint.sdk.android.androidcore.PrintController: at (PrintController.java:1646)PrintController.executePrint Print SDK error! Illegal form data. error.

I am suspecting that something is wrong with the layout of my XML. But couldn't figure out as I have followed the required requirements stated in the documentation for this Epson library.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
    <dict>
        <key>LWContentType</key>
        <string>LWContentTypeFrame</string>
        <key>LWTapeLengthAuto</key>
        <true/>
        <key>LWLayoutDirection</key>
        <string>LWLayoutDirectionHorizontal</string>
        <key>LWLengthMM</key>
        <integer>10</integer>
        <key>LWFrameSizeMode</key>
        <string>LWFrameSizeModePercent</string>
        <key>LWBorderType</key>
        <string>LWBorderTypeNone</string>
        <key>LWFrames</key>
        <!--   Layout sequence for the label         -->
        <array>
            <dict>
                <key>LWContentType</key>
                <string>LWContentTypeQRCode</string>
                <key>LWContentID</key>
                <string>LabelQrCode</string>
                <!-- in % -->
                <key>LWContentWidth</key>
                <string>20</string>
            </dict>

            <dict>
                <key>LWContentType</key>
                <string>LWContentTypeString</string>
                <key>LWContentID</key>
                <string>LabelString</string>
                <key>LWLineBreakMode</key>
                <string>LWLineBreakModeParagraph</string>
                <!-- in % -->
                <key>LWContentWidth</key>
                <string>80</string>

            </dict>

            <dict>

            </dict>
        </array>


    </dict>
</plist>

May I ask if I am missing a certain key in this XML ?


Solution

  • After repeated experimentation, I found out that the value for LWContentWidth needs to be a

    <integer></integer> rather than <string></string>