Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

467
Vistas
Save pdf to desired location in device React Native

I'm using RNHTMLtoPDF from 'react-native-html-to-pdf' and I want to store to my desired location so what should I do? I have a path that is storage emulated and that path is saved in a hook but I want this pdf downloaded to be in my device storage. Any help regarding this matter would be highly appreciated

enter image description here

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

maybe add a standard 'share' component from react-native?

https://reactnative.dev/docs/share

and the logic is when you click on pdf or whatever button you have - the share component will be opened and then you'll choose where you want to put that file(also to save it on your phone)

about 4 years ago · Juan Pablo Isaza Denunciar

0

You can use npm i react-native-fs library for save in local devices

Sample Code:

import React from 'react';
import {View, Text, TouchableOpacity} from 'react-native';
import RNFS from 'react-native-fs';

export default function App() {

  //if you want to save in download directory then you can use this path
  const path = RNFS.DownloadDirectoryPath;

  const saveFile = () => {
    RNFS.copyFile(yourCurrentFilePath, yourDestinationFilePath);
  };

  return (
    <View style={{flex: 1}}>
      <TouchableOpacity onPress={() => saveFile()}>
        <Text>Save</Text>
      </TouchableOpacity>
    </View>
  );
}

For More Information you can explore the react-native-fs library documents react-native-fs

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda