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

Watermark center shift #5

Open
SpirikleOfficial opened this issue Dec 7, 2023 · 0 comments
Open

Watermark center shift #5

SpirikleOfficial opened this issue Dec 7, 2023 · 0 comments

Comments

@SpirikleOfficial
Copy link

Issue
Using the defined PositionTypes, I used PositionType.Center and angle was pi/2. However, Instead of showing vertical text in the center, the text is shifted to right.

Use the following params in the example folder of this package:

double opacity = 50.0;
Color color = Colors.black;
double size = 100.0;
double angle = pi / 2;
PositionType position = PositionType.center;

final params = PDFWatermarkParams(
    pdfPath: pdfPath!,
    text: watermarkText!,
    positionType: position,
    fontSize: size,
    opacity: opacity,
    watermarkColor: color,
    rotationAngle: angle,
  );

Expected behavior
The text is expected to be in the center of the pdf.

Screenshots
screenshots are attached.
a

Smartphone:

  • Device: POCO F4
  • Android Version 13

Flutter Doctor

flutter doctor -v
[√] Flutter (Channel stable, 3.13.7, on Microsoft Windows [Version 10.0.22621.2715], locale en-CA)
    • Flutter version 3.13.7 on channel stable at C:\src\flutter\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 2f708eb839 (8 weeks ago), 2023-10-09 09:58:08 -0500
    • Engine revision a794cf2681
    • Dart version 3.1.3
    • DevTools version 2.25.0

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

[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at C:\Users\Admin\AppData\Local\Android\sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-10027231)
    • All Android licenses accepted.

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

[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.2.5)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.2.32616.157
    • Windows 10 SDK version 10.0.19041.0

[√] Android Studio (version 2022.3)
    • 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-10027231)

[√] VS Code (version 1.84.2)
    • VS Code at C:\Users\Admin\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)
    • 22021211RI (mobile) • 15693259 • android-arm64  • Android 13 (API 33)
    • Windows (desktop)   • windows  • windows-x64    • Microsoft Windows [Version 10.0.22621.2715]
    • Chrome (web)        • chrome   • web-javascript • Google Chrome 119.0.6045.200
    • Edge (web)          • edge     • web-javascript • Microsoft Edge 119.0.2151.97

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

• No issues found!

How can I solve this?

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

No branches or pull requests

1 participant