How to use the expo-print.Orientation function in expo-print

To help you get started, we’ve selected a few expo-print examples, based on popular ways it is used in public projects.

github expo / expo / apps / native-component-list / src / screens / PrintScreen.tsx View on Github external
_printHTMLLandscapeAsync = async () => {
    return this._printHTMLAsync(Print.Orientation.landscape);
  }
github expo / expo / apps / storybook / stories / APIs / Print.stories.js View on Github external
_printHTMLLandscapeAsync = async () => {
    return this._printHTMLAsync(Print.Orientation.landscape);
  };
github expo / expo / apps / storybook / stories / APIs / Print.stories.js View on Github external
  _printHTMLAsync = async (orientation = Print.Orientation.portrait) => {
    const { selectedPrinter } = this.state;

    try {
      await Print.printAsync({
        html: 'Dear Friend! <b>Happy</b> Birthday, enjoy your day! 🎈',
        printerUrl: selectedPrinter && selectedPrinter.url,
        orientation,
      });
    } catch (e) {
      Alert.alert('Something went wrong: ', e.message);
    }
  };
github expo / expo / apps / native-component-list / src / screens / PrintScreen.tsx View on Github external
  _printHTMLAsync = async (orientation: string = Print.Orientation.portrait) => {
    const { selectedPrinter } = this.state;

    try {
      await Print.printAsync({
        html: 'Dear Friend! <b>Happy</b> Birthday, enjoy your day! 🎈',
        printerUrl: selectedPrinter && selectedPrinter.url,
        orientation,
      });
    } catch (e) {
      Alert.alert('Something went wrong: ', e.message);
    }
  }

expo-print

Provides an API for iOS (AirPrint) and Android printing functionality.

MIT
Latest version published 3 months ago

Package Health Score

90 / 100
Full package analysis

Similar packages