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

[expo-print] first print with a font via <link href='...' rel='stylesheet'> prints blank lines #29064

Closed
timheilman opened this issue May 23, 2024 · 2 comments
Labels
needs review Issue is ready to be reviewed by a maintainer stale

Comments

@timheilman
Copy link

timheilman commented May 23, 2024

Minimal reproducible example

https://github.com/timheilman/reproduce-expo-print-first-time-failure-android.git

What platform(s) does this occur on?

Android

Did you reproduce this issue in a development build?

Yes

Summary

Calling expo-print's printToFileAsync, passing HTML such as in the reproduction that includes a reference like this:

<link href='https://fonts.googleapis.com/css?family=Tangerine' rel='stylesheet'>

the print succeeds in producing a PDF in the cache directory, HOWEVER, no text appears, although if the text is underlined, the underlines do appear. For example:

Screenshot 2024-05-22 at 6 17 31 PM

Reloading the app and trying the print again then succeeds, I suspect because the font has by this time been successfully downloaded and cached:

Screenshot 2024-05-22 at 6 17 44 PM

NOTE: after the first reproduction of this bug, to get it to fire again requires going to the Apps Settings in Android, then Storage, then (not sure which is necessary, but both does work): clear cache and clear data.

Environment

expo-env-info 1.2.0 environment info:
System:
OS: macOS 13.5.1
Shell: 5.9 - /bin/zsh
Binaries:
Node: 18.19.0 - ~/.nvm/versions/node/v18.19.0/bin/node
Yarn: 1.22.21 - ~/.nvm/versions/node/v18.19.0/bin/yarn
npm: 10.2.3 - ~/.nvm/versions/node/v18.19.0/bin/npm
Watchman: 2024.01.22.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.15.2 - /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 23.2, iOS 17.2, macOS 14.2, tvOS 17.2, visionOS 1.0, watchOS 10.2
IDEs:
Android Studio: 2023.1 AI-231.9392.1.2311.11330709
Xcode: 15.2/15C500b - /usr/bin/xcodebuild
npmPackages:
expo: ~51.0.8 => 51.0.8
react: 18.2.0 => 18.2.0
react-native: 0.74.1 => 0.74.1
npmGlobalPackages:
eas-cli: 5.9.3
Expo Workflow: managed

Expo Doctor Diagnostics

✔ Check Expo config for common issues
✔ Check package.json for common issues
✔ Check native tooling versions
✔ Check dependencies for packages that should not be installed directly
✔ Check for common project setup issues
✔ Check npm/ yarn versions
✔ Check for issues with metro config
✔ Check Expo config (app.json/ app.config.js) schema
✔ Check for legacy global CLI installed locally
✔ Check that native modules do not use incompatible support packages
✔ Check that native modules use compatible support package versions for installed Expo SDK
✔ Check that packages match versions required by installed Expo SDK

Didn't find any issues with the project!

@timheilman timheilman added the needs validation Issue needs to be validated label May 23, 2024
@expo-bot expo-bot added needs review Issue is ready to be reviewed by a maintainer and removed needs validation Issue needs to be validated labels May 23, 2024
@timheilman timheilman changed the title expo-print does not wait for <link href=... rel='stylesheet'> fonts to load prior to printing [expo-print] first print with a font via <link href='...' rel='stylesheet'> prints blank lines Jun 4, 2024
Copy link
Contributor

github-actions bot commented Sep 2, 2024

This issue is stale because it has been open for 90 days with no activity. If there is no activity in the next 7 days, the issue will be closed.

@github-actions github-actions bot added the stale label Sep 2, 2024
Copy link
Contributor

github-actions bot commented Sep 9, 2024

This issue was closed because it has been inactive for 7 days since being marked as stale. Please open a new issue if you believe you are encountering a related problem.

@github-actions github-actions bot closed this as completed Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs review Issue is ready to be reviewed by a maintainer stale
Projects
None yet
Development

No branches or pull requests

2 participants