> ## 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.

# Quickstart

> Your first conversion form with @markpdf/svelte in less than 20 lines.

# Quickstart

## Conversion store with progress

```svelte theme={null}
<script lang="ts">
  import { MarkpdfClient, createConvertStore } from "@markpdf/svelte";

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

  function onFile(e: Event) {
    const file = (e.target as { files?: FileList | null }).files?.[0];
    if (file) convertStore.convert(file, { mode: "fast" });
  }
</script>

<input type="file" accept="application/pdf" on:change={onFile} />

{#if $convertStore.status === "uploading"}
  <progress value={$convertStore.progress} max={100} />
{/if}

{#if $convertStore.status === "converting"}
  <p>Convirtiendo…</p>
{/if}

{#if $convertStore.error}
  <p>Error: {$convertStore.error.message}</p>
{/if}

{#if $convertStore.markdown}
  <pre>{$convertStore.markdown}</pre>
{/if}
```

`createConvertStore` returns `Readable<ConvertState>` — use the `$convertStore` syntax to subscribe automatically, like any Svelte store.

## Raw client (no progress)

```ts theme={null}
import { MarkpdfClient } from "@markpdf/svelte";

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

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

`MarkpdfClient` re-exported from `@markpdf/svelte` is the same as [`@markpdf/sdk`](/docs/sdks/nodejs/reference) — all its methods (`convertFile`, `convertFromUrl`, `convertStream`, `pdfIndex`, `getJob`) are available.

## Siguiente paso

* [Referencia completa](/docs/sdks/svelte/reference)
* [Framework guide: SvelteKit](/docs/sdks/svelte/framework-guide)
* [Streaming and asynchronous jobs](/docs/sdks/svelte/streaming-and-async)
