question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Help] How can i view the pdf created by Print.printToFileAsync({ ‘html’: ‘<h1>wasup</h1>’})

See original GitHub issue

Hi Guys,

Using the expo print api, When i use a file explorer app and navigate to the cache directory of expo app i don’t see anything. The uri which we get on console log in response to await Print.printToFileAsync({ 'html':'<h1>Wassup<h1>' }); is not accessible.

Can anybody please help me out? thanks

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jarodsmkcommented, Mar 20, 2019

Came across this - been trying to figure out a similar thing myself, tried out @themakerman 's solution, but on iOS the data is printed differently (i had an image that prints on one page in Android, but 2 pages on iOS)

@esamelson - When creating a file using printToFileAsync(...), how does the user of a device get access to that file, and what is the recommended way of coding around that?

Many thanks in advance!

0reactions
esamelsoncommented, Sep 18, 2018

Hi @themakerman - glad you figured it out. Yes, please do submit a PR to the docs! 🙂 You can do so here: https://github.com/expo/expo-docs

Read more comments on GitHub >

github_iconTop Results From Across the Web

Print - Expo Documentation
Print.printToFileAsync(options) ... Prints HTML to PDF file and saves it to app's cache directory. On Web this method opens the print dialog. Returns....
Read more >
How to fix Expo Print.printToFileAsync(options) undefined is ...
I started using React Native libraries but as I searched, turns out I can only use Expo's library so I switched to Print.printToFileAsync()....
Read more >
How to Generate a PDF Document in a React Native Project
The simplest way to create a PDF document in a React Native project includes the use of Expo Print plugin. The first step...
Read more >
Generating a PDF File from Expo React Native App - YouTube
Hi everyone!Today I have a tutorial on how to use the expo- print package to create a PDF from HTML. This could be...
Read more >
Print HTML as a Document from React Native App for Android ...
In this example, we will see how to print HTML as a document, make pdf from HTML and print remote PDF from URL....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found