ekasetiawans / flutter_bluetooth_printer_plugin

MIT License
25 stars 47 forks source link

Papersize 80mm #45

Open u-sour opened 3 months ago

u-sour commented 3 months ago

hi @ekasetiawans, how can i change paper size from 58mm to 80mm ? thank in advance.

haidang750 commented 3 months ago

interested.

haidang750 commented 3 months ago

hi @u-sour , I want to ask you whether you can print on IOS platform? I worked well on Android but couldn't print on IOS version 17. Is there any required permission I have to add to Info.plist?

ekasetiawans commented 3 months ago

Currently I don’t owned the 80mm printer, but if you want to cotribute you can fork the repository and add the PaperSize enum. Make sure the paper width is the max dot per lines, you can find it from the printer device information or printer test page.

u-sour commented 3 months ago

@haidang750 i haven't tested it on IOS yet maybe tomorrow. @ekasetiawans oh, i don't owed it, too. maybe i can borrow from friend to test it, can you show which line of code i need to add ?

u-sour commented 3 months ago

@haidang750 i just test it on IOS version 17.5.1 it works.

haidang750 commented 3 months ago

@u-sour which printer did you use to test it?

haidang750 commented 3 months ago

and can you please share your Bluetooth permissions in your Info.plist file?

u-sour commented 3 months ago

@u-sour which printer did you use to test it?

Printer: MPT-II 58mm

u-sour commented 3 months ago

and can you please share your Bluetooth permissions in your Info.plist file?

Info.plist :

<dict>
    <key>CADisableMinimumFrameDurationOnPhone</key>
    <true/>
    <key>CFBundleDevelopmentRegion</key>
    <string>$(DEVELOPMENT_LANGUAGE)</string>
    <key>CFBundleDisplayName</key>
    <string>Flutter Template</string>
    <key>CFBundleExecutable</key>
    <string>$(EXECUTABLE_NAME)</string>
    <key>CFBundleIdentifier</key>
    <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleLocalizations</key>
    <array>
        <string>en</string>
        <string>km</string>
    </array>
    <key>CFBundleName</key>
    <string>flutter_template</string>
    <key>CFBundlePackageType</key>
    <string>APPL</string>
    <key>CFBundleShortVersionString</key>
    <string>$(FLUTTER_BUILD_NAME)</string>
    <key>CFBundleSignature</key>
    <string>????</string>
    <key>CFBundleVersion</key>
    <string>$(FLUTTER_BUILD_NUMBER)</string>
    <key>LSRequiresIPhoneOS</key>
    <true/>
    <key>NSBluetoothAlwaysUsageDescription</key>
    <string>Bluetooth permission is required for accessories connecting.</string>
    <key>NSCameraUsageDescription</key>
    <string>Camera permission is required for barcode scanning.</string>
    <key>UIApplicationSupportsIndirectInputEvents</key>
    <true/>
    <key>UIBackgroundModes</key>
    <array>
        <string>bluetooth-central</string>
    </array>
    <key>UILaunchStoryboardName</key>
    <string>LaunchScreen</string>
    <key>UIMainStoryboardFile</key>
    <string>Main</string>
    <key>UISupportedInterfaceOrientations</key>
    <array>
        <string>UIInterfaceOrientationPortrait</string>
        <string>UIInterfaceOrientationLandscapeLeft</string>
        <string>UIInterfaceOrientationLandscapeRight</string>
    </array>
    <key>UISupportedInterfaceOrientations~ipad</key>
    <array>
        <string>UIInterfaceOrientationPortrait</string>
        <string>UIInterfaceOrientationPortraitUpsideDown</string>
        <string>UIInterfaceOrientationLandscapeLeft</string>
        <string>UIInterfaceOrientationLandscapeRight</string>
    </array>
</dict>
haidang750 commented 3 months ago

thank you @u-sour

u-sour commented 3 months ago

thank you @u-sour

nvm 😄

haidang750 commented 3 months ago

hi @u-sour , have you found the solution for case paperSize 80mm?

u-sour commented 2 months ago

@haidang750 i don't have a mini printer 80mm to test it while i going to borrow it from my friend it broken.