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

Printing spec symbols like Æ, Ø, and Å on TSP700II #6

Open
OlyaMonka opened this issue Oct 5, 2022 · 18 comments
Open

Printing spec symbols like Æ, Ø, and Å on TSP700II #6

OlyaMonka opened this issue Oct 5, 2022 · 18 comments
Assignees
Labels

Comments

@OlyaMonka
Copy link

Description

Tried to use StarXpandSDK example, with spec symbols.

Your device where the bug occurs

  • Device:
    iPad
  • OS:
    iOS 15.0

Your printer

  • Model Names:
    TSP650II
  • Interface:
    Bluetooth

Additional context

Changed sample code with using .styleInternationalCharacter(.norway)

let builder = StarXpandCommand.StarXpandCommandBuilder()
        _ = builder.addDocument(StarXpandCommand.DocumentBuilder.init()
                                    .addPrinter(StarXpandCommand.PrinterBuilder()
                                                    .actionPrintImage(StarXpandCommand.Printer.ImageParameter(image: logo, width: 406))
                                                    .styleCharacterSpace(0)
                                                    .styleAlignment(.center)
                                                    .styleInternationalCharacter(.norway)
                                                    .actionPrintText("Søk etter bruker-ID\n" +
                                                                     "123 Star Road\n" +
                                                                     "City, State 12345\n" +
                                                                     "\n")
                                                    .styleAlignment(.left)
                                                    .actionPrintText("Date:MM/DD/YYYY    Time:HH:MM PM\n" +
                                                                     "--------------------------------\n" +
                                                                     "\n")
                                                    .add(
                                                        StarXpandCommand.PrinterBuilder()
                                                            .styleBold(true)
                                                            .actionPrintText("SALE \n")
                                                    )
                                                    .actionPrintText("SKU         Description    Total\n" +
                                                                     "300678566   PLAIN T-SHIRT  10.99\n" +
                                                                     "300692003   BLACK DENIM    29.99\n" +
                                                                     "300651148   BLUE DENIM     29.99\n" +
                                                                     "300642980   STRIPED DRESS  49.99\n" +
                                                                     "300638471   BLACK BOOTS    35.99\n" +
                                                                     "\n" +
                                                                     "Subtotal                  156.95\n" +
                                                                     "Tax                         0.00\n" +
                                                                     "--------------------------------\n")
                                                    .actionPrintText("Total     ")
                                                    .add(
                                                        StarXpandCommand.PrinterBuilder()
                                                            .styleMagnification(StarXpandCommand.MagnificationParameter(width: 2, height: 2))
                                                            .actionPrintText("   156.95 kr\n")
                                                    )
                                                    .actionPrintText("--------------------------------\n" +
                                                                     "\n" +
                                                                     "Charge\n" +
                                                                     "156.95\n" +
                                                                     "Visa XXXX-XXXX-XXXX-0123\n" +
                                                                     "\n")
                                                    .add(
                                                        StarXpandCommand.PrinterBuilder()
                                                            .styleInvert(true)
                                                            .actionPrintText("Refunds and Exchanges\n")
                                                    )
                                                    .actionPrintText("Within ")
                                                    .add(
                                                        StarXpandCommand.PrinterBuilder()
                                                            .styleUnderLine(true)
                                                            .actionPrintText("30 days")
                                                    )
                                                    .actionPrintText(" with receipt\n" +
                                                                     "And tags attached\n" +
                                                                     "\n")
                                                    .styleAlignment(.center)
                                                    .actionPrintBarcode(StarXpandCommand.Printer.BarcodeParameter(content: "0123456", symbology: .jan8)
                                                                            .setBarDots(3)
                                                                            .setHeight(5)
                                                                            .setPrintHRI(true))
                                                    .actionFeedLine(1)
                                                    .actionPrintQRCode(StarXpandCommand.Printer.QRCodeParameter(content: "Hello World.\n")
                                                                        .setLevel(.l)
                                                                        .setCellSize(8))
                                                    .actionCut(StarXpandCommand.Printer.CutType.partial)))

but result isn't correct
image

@OlyaMonka
Copy link
Author

@bandit-ibayashi Any suggestions?

@j0mbajuice
Copy link

@OlyaMonka What firmware version do you have for the printer? You can print a self test from the printer to check this.

To print a self-test, turn the printer OFF, press and hold down the FEED button and then turn the printer back ON while holding the FEED button (release FEED once printing begins or when you hear the mechanical noise)

@OlyaMonka
Copy link
Author

image
@j0mbajuice please have a look

@xxkawspuffs
Copy link

@OlyaMonka Seems like a firmware upgrade may do the trick based on that print out. Assuming the printer is the 650II and not the 650IISK version you'd need to upgrade the firmware. Contact MST support and they should assist you with the upgrade. You can contact them here: [email protected].

@xxkawspuffs
Copy link

@OlyaMonka Has this issue been fixed by doing a firmware upgrade to the printer?

@OlyaMonka
Copy link
Author

@xxkawspuffs No( Firmware was upgrade, but issue still exist.
image

@OlyaMonka
Copy link
Author

@xxkawspuffs @j0mbajuice any suggestions?

@OlyaMonka
Copy link
Author

Any updates?

@bandit-ibayashi bandit-ibayashi added the Status: triage Start out by looking at issues label Feb 20, 2023
@bandit-ibayashi
Copy link
Member

@OlyaMonka We much appreciated your report and we are afraid our late response. We have confirmed this issue is reproducible.

We apologize for the inconvenience, but could you please try the following temporary workaround?

  1. Download StarIO and StarIOExtension framework and add these frameworks to your project.

    add_framework

  2. Add "Objective-C Bridging Header" by following the steps below in order from the top to the bottom.

    • Select File - New - File... from Xcode menu.

    • Select Header File, and then click Next.

    • Enter a name and click Create to create an empty header file. In the example shown below, the header file name is "StarIO_Extension-Bridging-Header.h".

    • Write the following import lines in the header file created.

      #ifndef StarIO_Extension_Bridging_Header_h
      #define StarIO_Extension_Bridging_Header_h
      
      #import <StarIO/SMPortSwift.h>
      #import <StarIO_Extension/StarIoExt.h>
      
      #endif /* StarIO_Extension_Bridging_Header_h */
      
    • Specify the path to the created header file at Objective-C Bridging Header of Build Settings.

      specify-path

  3. Create print data using StarIoExt.createCommandBuilder().

    let encoding = String.Encoding.windowsCP1252
         
    let extentionBuilder: ISCBBuilder = StarIoExt.createCommandBuilder(.starLine)
         
    extentionBuilder.beginDocument()
         
    extentionBuilder.append(SCBCodePageType.CP1252)
    extentionBuilder.append(SCBInternationalType.norway)
    extentionBuilder.appendCharacterSpace(0)
         
    extentionBuilder.appendAlignment(SCBAlignmentPosition.center)
    extentionBuilder.append(("Søk øetter bruker-ID\n").data(using: encoding))
    
    extentionBuilder.endDocument()
  4. Use StarXpandCommand.DocumentBuilder.addRaw() method to add to StarXpandCommandBuilder.

    let builder = StarXpandCommand.StarXpandCommandBuilder()
    builder.addDocument(StarXpandCommand.DocumentBuilder.init()
          .addRaw(extentionBuilder.commands as Data))
    

We are sorry again to bother you, but thank you for your understanding.

@bandit-ibayashi bandit-ibayashi added Type: bug Something isn't working and removed Status: triage Start out by looking at issues labels Mar 9, 2023
@bandit-ibayashi bandit-ibayashi changed the title Problem with printing spec symbols like Æ, Ø, and Å Printing spec symbols like Æ, Ø, and Å on TSP700II Mar 9, 2023
@OlyaMonka
Copy link
Author

@bandit-ibayashi
Thanks for answer.
We used StarPRNT-SDK-iOS-Swift in previous version. But now we need to add TSP143IIIU USB POS printer for supporting, and this model is not included in that version of SDK, so we moved to StarXpand-SDK-iOS. How to fix a problem with spec symbols and support TSP143IIIU at the same time?

@gare-bear
Copy link

gare-bear commented Mar 14, 2023

@OlyaMonka TSP143IIIU is supported in the StarPRNT SDK. Officially supported from StarIO 2.3.0, released in 2017.

@bandit-ibayashi
Copy link
Member

@OlyaMonka Thank you for your confirmation.

As @gare-bear mentioned, our StarPRNT SDK has already been supported TSP143IIIU, but please note that the TSP143IIIU does not have printer built-in fonts as a printer specification and printing by text is not possible. It is needed to create raster data of receipt data on the host side like using appendBitmap() method on StarIO and so on to make it into a print command.

In this case, this symbol issue will not occur if the raster data can be created correctly on the host side.

@nickdnk
Copy link

nickdnk commented Sep 7, 2023

Hello

We have the same problem on the 650II. Do you have any plans to fix this? It's kind of making the StarXPand framework a non-starter compared to the old SDK (which was Cocoapods only).

Edit: Strangely, it works on MCP31LB. Would this indicate that a firmware update is required on the 650II? It says it's running TSP650II Ver 2.1 -b1.0.

We have some 654IIs as well. I suppose these are also broken.

@nickdnk
Copy link

nickdnk commented Sep 7, 2023

@OlyaMonka Did you ever get this to work on the 650II?

@OlyaMonka
Copy link
Author

@nickdnk No (

@nickdnk
Copy link

nickdnk commented Sep 8, 2023

I was just sent the version 8 software. Did you try that?

@OlyaMonka
Copy link
Author

No, we did back to StarPRNT-SDK-iOS-Swift and still use it.

@nickdnk
Copy link

nickdnk commented Sep 8, 2023

No, we did back to StarPRNT-SDK-iOS-Swift and still use it.

Okay. Pretty crazy that they won't fix this issue. I'll be trying the version 8 software soon and see how that works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants