Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

284
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda