Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

281
Views
Pdf file not created using react-native-html-to-pdf

I am using React Native v0.67.2 and looking to generate PDF from HTML using react-native-html-to-pdf. This is the function I use to generate the PDF, but the location of generated Pdf isn't showing in the iOS file manager.

const createPDF = async () => {
  let options = {
    html: '<h1>PDF TEST</h1>',
    fileName: 'testFile',
    directory: 'Documents',
  };

  let file = await RNHTMLtoPDF.convert(options);

  // console.log(file.filePath);
  alert(file.filePath);
}

The file exists in an unknown location, but I'm expecting the downloaded PDF file in the 'Documents' directory of iPhone Files. How do I move the PDF to this location and resolve this issue?

Thank you in advance.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Duplicate of: pdf created by react native html to pdf is not showing in provided path

On IOS you can only use that Documents path that you already have. You cannot make it save anywhere else.

Directory where the file will be created (Documents folder in example above). Please note, on iOS Documents is the only custom value that is accepted.

Ref: https://github.com/christopherdro/react-native-html-to-pdf#options

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!