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

# PDF Online

> Use SoMark to publish a PDF, image, Word, or PowerPoint file as an editable document, spreadsheet, or structured table in Feishu, DingTalk, or Notion.

`pdf-online` completes the “parse a file → publish to a workspace” workflow inside an agent conversation. Give the agent a file, destination platform, and target type. It uses SoMark to parse the content, then creates editable content in Feishu, DingTalk, or Notion.

Use it to turn scans, contracts, papers, textbooks, or reports into online documents; convert complex tables into spreadsheets; or import lists, plans, and progress trackers as filterable records. When you publish to multiple platforms in one task, the source is parsed only once.

<Note>
  PDF Online creates editable content using the destination platform's native capabilities. You can continue editing after publishing, and a routine check of key data is recommended.
</Note>

## What you can create

PDF Online can publish the same parsed result as a document, spreadsheet, or structured-record target. Choose the content form based on how you will work with it, then select the destination platform:

| Content form       | Best for                                                                  | Feishu                | DingTalk                 | Notion                           |
| ------------------ | ------------------------------------------------------------------------- | --------------------- | ------------------------ | -------------------------------- |
| Document or page   | Reading, editing, and sharing long-form content                           | Feishu cloud document | DingTalk online document | Notion page                      |
| Spreadsheet        | Reviewing layout, filling values, and archiving tables                    | Feishu spreadsheet    | DingTalk spreadsheet     | Editable simple tables in a page |
| Structured records | Filtering, sorting, status tracking, calendars, Gantt views, or workflows | Feishu Bitable        | DingTalk AI Table        | New Notion database              |

If you omit the target type, Feishu defaults to a cloud document and Notion defaults to a page. DingTalk selects a route based on narrative, grid, or record intent; the agent asks when the choice would materially change fidelity. A table in the source never causes Notion to switch to database mode automatically.

After you select a target, the Skill maps the structures recognized by SoMark into each platform's native content model rather than pasting plain text:

### Feishu

**Cloud document** supports headings, body text, bulleted and numbered lists, quotes, to-dos, code, tables, images, and inline and block equations. Choices and footnotes are adapted as lists and quotes, respectively.

**Spreadsheet** supports worksheets, text cells, merged cells, borders, cell styles such as font, alignment, and wrapping, row and column dimensions, and embedded images.

**Bitable** supports text, number, and date fields with their records.

### DingTalk

**Online document** supports headings, body text, lists, code, images, tables, and equations; table cells can use rich text, images, equations, and superscripts. Choices are adapted as lists and footnotes remain as numbered, editable endnotes.

**Spreadsheet** supports worksheets, text cells, merged cells, styles, row and column dimensions, and images.

**AI Table** supports text, date, progress, number (including currency and rating), and single-select fields with their records; people fields are created only when valid `userId` and `corpId` values are provided.

### Notion

**Page** supports a page title, headings, body text, lists, a table of contents, tables, images, code blocks, and equation blocks. Choices are adapted as bulleted lists and footnotes as quotes; stamps and chemical structures become images, table-cell images become links followed by separate images, and the API cannot create merged cells.

**Database** supports title, rich-text, number, date, and single-select fields with their records.

## How it works

```text theme={null}
Provide a source file or named SoMark results
→ Choose a platform and target type
→ Parse once with SoMark
→ Convert for the destination
→ Create the target and return its link
→ Apply required enhancements and verification
```

The same source is parsed at most once per task. Multiple platforms share the same Markdown and JSON pair. If publishing fails, recovery reuses those results instead of consuming parsing quota again.

The Skill skips parsing only when you explicitly provide an exact matching SoMark Markdown and JSON pair. It never searches for adjacent, same-name, or historical results. If you provide both a source file and the pair, Markdown and JSON are authoritative for content and structure; the source file is provenance only.

## Before you begin

<Steps>
  <Step title="Install both Skills">
    `pdf-online` selects and publishes the target. For raw files, it calls the separately installed official `somark-document-parser` Skill.

    <Tabs>
      <Tab title="Install with an agent">
        ```text theme={null}
        Install the pdf-online Skill from https://github.com/SoMarkAI/skills,
        and install the official somark-document-parser Skill.
        ```
      </Tab>

      <Tab title="Install with commands">
        ```bash theme={null}
        npx skills add SoMarkAI/skills --skill pdf-online
        npx skills add https://github.com/SoMarkAI/somark-document-parser
        ```
      </Tab>
    </Tabs>
  </Step>

  <Step title="Configure your SoMark API key">
    For the overseas service, get an API key at [somark.ai](https://somark.ai/Studio/apikey). For the Mainland China service, use [somark.cn](https://somark.cn). Configure `SOMARK_API_KEY` as instructed by your agent.

    SoMark parsing consumes quota. Reusing an explicitly named result pair does not parse the file again.
  </Step>

  <Step title="Install platform dependencies and authorize access">
    All three adapters require a working Python 3 environment. Prepare the dependency for your destination:

    | Destination | Dependency and authorization                                                                                                            |
    | ----------- | --------------------------------------------------------------------------------------------------------------------------------------- |
    | Feishu      | Install the Feishu `lark-cli`, complete user authorization, and grant the required cloud-document, spreadsheet, or Bitable permissions. |
    | DingTalk    | Install the DWS CLI, configure the account Profile to use, and authorize the relevant workspace.                                        |
    | Notion      | Connect the official Notion MCP/connector in your agent and grant content-creation access; no additional platform CLI is required.      |

    Notion also requires a parent-page link where the connection can create content.
  </Step>

  <Step title="Prepare the input and target">
    Raw input can be a PDF, common image format, Word document, or PowerPoint presentation. Prepare the file path, platform, target type, and an optional destination link. Never put API keys, access tokens, or company credentials in a prompt.
  </Step>
</Steps>

## Basic usage

The display name is **PDF Online**, and the Skill name is `pdf-online`. Include `$pdf-online` in your prompt and name the input, platform, and target type for more reliable routing.

<Tabs>
  <Tab title="Feishu">
    ```text theme={null}
    Use $pdf-online to parse this contract and create an editable Feishu cloud document.
    ```

    ```text theme={null}
    Use $pdf-online to convert this table-heavy PDF into a Feishu spreadsheet.
    Preserve merged cells, borders, column widths, and table images.
    ```

    ```text theme={null}
    Use $pdf-online to parse this project plan and create a new Feishu Bitable.
    Map dates and numbers to suitable field types.
    ```
  </Tab>

  <Tab title="DingTalk">
    ```text theme={null}
    Use $pdf-online to convert this scanned PDF into an editable DingTalk document.
    ```

    ```text theme={null}
    Use $pdf-online to publish this table-heavy PDF as a DingTalk spreadsheet.
    Return the content preview first, then apply styles, merged cells, and images.
    ```

    ```text theme={null}
    Use $pdf-online to parse this progress tracker and create a DingTalk AI Table.
    Preserve its date, progress, and category fields.
    ```
  </Tab>

  <Tab title="Notion">
    ```text theme={null}
    Use $pdf-online to convert this paper into a Notion page under this parent:
    <Notion parent-page URL>.
    ```

    ```text theme={null}
    Use $pdf-online to create a new Notion database from this list.
    Parent page: <Notion parent-page URL>.
    ```
  </Tab>
</Tabs>

### Publish to multiple platforms

```text theme={null}
Use $pdf-online to parse this PDF only once, then publish it as a Feishu cloud
document, a DingTalk online document, and a Notion page.
Notion parent page: <Notion parent-page URL>.
```

## Limitations

* The Skill does not rewrite OCR prose, invent missing content, or automatically repair vertical text, alignment, or damaged formulas.
* Table conversion follows the structure recognized by SoMark. It does not run a second OCR pass or visually infer headers.
* Spreadsheet images, merge ranges, and styles are processed independently; an issue with one element does not affect content already written to the workbook.
* Structured-record targets need clear headers. Empty or duplicate headers receive safe names and a mapping notice; the agent never guesses among multiple tables.
* After a creation or post-processing failure, the Skill reuses the current parse and existing target instead of parsing again or creating an arbitrary replacement.
* In a multi-platform task, each destination is independent. Failure on one platform does not undo successful publishing on another.
