dart_pdf icon indicating copy to clipboard operation
dart_pdf copied to clipboard

Height in TextStyle is ignored

Open EmanueleVinci opened this issue 1 year ago • 1 comments

Package Version 3.10.4

Describe the bug Height in textStyle is ignored, no matter what value I set

To Reproduce Code snippet to reproduce the behavior:

    Document pdf = Document();

    Page testPage = Page(
      pageFormat: PdfPageFormat.a4,
      build: (context) {
        return Text(
            'lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum',
            style: TextStyle(fontSize: 10, height: 10));
      },
    );
	
    pdf.addPage(testPage);
    await pdf.save();

Expected behavior I expect to see the difference between height 1 and 4 (for example), like in the Flutter widget

Screenshots Screenshot_20230707_163834

Flutter Doctor

[√] Flutter (Channel stable, 3.10.5, on Microsoft Windows [Version 10.0.22621.1848], locale it-IT)
    • Flutter version 3.10.5 on channel stable at C:\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 796c8ef792 (3 weeks ago), 2023-06-13 15:51:02 -0700
    • Engine revision 45f6e00911
    • Dart version 3.0.5
    • DevTools version 2.23.1

[√] Windows Version (Installed version of Windows is version 10 or higher)

[!] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
    • Android SDK at C:\Users\emanu\AppData\Local\Android\sdk
    X cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    X Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[!] Visual Studio - develop for Windows (Visual Studio Community 2022 17.6.3)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.6.33801.468
    X Visual Studio is missing necessary components. Please re-run the Visual Studio installer for the "Desktop development with C++" workload,
      and include these components:
        MSVC v142 - VS 2019 C++ x64/x86 build tools
         - If there are multiple build tool versions available, install the latest
        C++ CMake tools for Windows
        Windows 10 SDK

[√] Android Studio (version 2022.2)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-9586694)

[√] VS Code (version 1.79.2)
    • VS Code at C:\Users\emanu\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension can be installed from:
       https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[√] Connected device (4 available)
    • sdk gphone x86 64 (mobile) • emulator-5556 • android-x64    • Android 13 (API 33) (emulator)
    • Windows (desktop)          • windows       • windows-x64    • Microsoft Windows [Version 10.0.22621.1848]
    • Chrome (web)               • chrome        • web-javascript • Google Chrome 114.0.5735.199
    • Edge (web)                 • edge          • web-javascript • Microsoft Edge 114.0.1823.67

[√] Network resources
    • All expected network resources are available.

! Doctor found issues in 2 categories.

Desktop (please complete the following information):

  • [ v] Android
  • [ v] Browser

EmanueleVinci avatar Jul 07 '23 14:07 EmanueleVinci

Any news about this issue?

ryosoul avatar Jan 11 '24 11:01 ryosoul