> ## Documentation Index
> Fetch the complete documentation index at: https://docs.markpdf.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# Inicio rápido

> Seleccione un PDF con expo-document-picker y conviértalo a menos de 20 líneas.

# Inicio rápido

## Con exposición (`expo-document-picker`)

```tsx theme={null}
import * as DocumentPicker from "expo-document-picker";
import { MarkpdfClient } from "@markpdf/react-native";

const client = new MarkpdfClient({ apiKey: "YOUR_API_KEY" });

async function pickAndConvert() {
  const result = await DocumentPicker.getDocumentAsync({ type: "application/pdf" });
  if (result.canceled) return;

  const file = result.assets[0];
  const markdown = await client.convertLocalFile({
    uri: file.uri,
    name: file.name,
    mimeType: file.mimeType,
  });

  console.log(markdown);
}
```

## Con RN desnudo (`react-native-document-picker`)

```tsx theme={null}
import DocumentPicker from "react-native-document-picker";
import { MarkpdfClient } from "@markpdf/react-native";

const client = new MarkpdfClient({ apiKey: "YOUR_API_KEY" });

async function pickAndConvert() {
  const [file] = await DocumentPicker.pick({ type: [DocumentPicker.types.pdf] });

  const markdown = await client.convertLocalFile({
    uri: file.uri,
    name: file.name ?? "document.pdf",
    mimeType: file.type ?? undefined,
  });

  console.log(markdown);
}
```

`convertLocalFile` carga el archivo tal como está en el disco (a través de `uri`) sin leerlo primero en la memoria JS: clave en el móvil, donde el RAM del proceso JS es limitado.

## Convertir de URL

```ts theme={null}
const markdown = await client.convertFromUrl(
  "https://bucket.example.com/report.pdf?sig=...",
  "report.pdf",
  { mode: "fast" }
);
```

## Con progreso de carga (`useConvertFile`)

```tsx theme={null}
import { useConvertFile } from "@markpdf/react-native";
import { View, Button, Text } from "react-native";

function UploadScreen({ client }: { client: MarkpdfClient }) {
  const { convert, status, progress, markdown } = useConvertFile(client);

  return (
    <View>
      <Button title="Elegir PDF" onPress={async () => {
        const result = await DocumentPicker.getDocumentAsync({ type: "application/pdf" });
        if (!result.canceled) {
          convert({ uri: result.assets[0].uri, name: result.assets[0].name });
        }
      }} />
      {status === "uploading" && <Text>Subiendo {progress}%</Text>}
      {markdown && <Text>{markdown}</Text>}
    </View>
  );
}
```

## Siguiente paso

* [Referencia completa](/docs/public/es/sdks/react-native/reference)
* [Guía de marco: Expo vs RN simple](/docs/public/es/sdks/react-native/framework-guide)
* [Trabajos en streaming y asincrónicos](/docs/public/es/sdks/react-native/streaming-and-async)
