# Export document with all content from one topic?

**URL:** https://meta.discourse.org/t/export-document-with-all-content-from-one-topic/256411
**Category:** Support
**Created:** [February 27, 2023, 5:25pm UTC](https://meta.discourse.org/t/export-document-with-all-content-from-one-topic/256411 "2023-02-27T17:25:18Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![curi](https://avatars.discourse-cdn.com/v4/letter/c/e68b1a/32.png) [@curi](https://meta.discourse.org/u/curi)
#### Post date: [February 27, 2023, 5:25pm UTC](https://meta.discourse.org/t/export-document-with-all-content-from-one-topic/256411/1 "2023-02-27T17:25:18Z")

</div>

I’m looking for a way – setting, plugin, external script, anything – to get all posts from one topic into a single document (markdown, pdf, html, anything is fine). Are there any options available?

Even if it lost some formatting and images this would still be useful to me.

---

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [February 27, 2023, 5:33pm UTC](https://meta.discourse.org/t/export-document-with-all-content-from-one-topic/256411/2 "2023-02-27T17:33:04Z")

</div>

Maybe that topic has an optiin that is useful for you

> [@How to print or export very long topics](https://meta.discourse.org/t/how-to-print-or-export-very-long-topics/223138/4):
>
> Other than pressing Ctrl + p any time you want to either print or export to PDF/HTML, if you want to export to markdown you can visit the raw route like [https://meta.discourse.org/raw/223138](https://meta.discourse.org/raw/223138)

---

<div class="post-metadata">

### Author: ![curi](https://avatars.discourse-cdn.com/v4/letter/c/e68b1a/32.png) [@curi](https://meta.discourse.org/u/curi)
#### Post date: [February 27, 2023, 5:38pm UTC](https://meta.discourse.org/t/export-document-with-all-content-from-one-topic/256411/3 "2023-02-27T17:38:58Z")

</div>

Thank you. I did a couple searches but didn’t find that.

Is there any query string parameter like per\_page that I can use? I tried that and it didn’t work, but maybe it’s spelled differently.

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [February 27, 2023, 5:41pm UTC](https://meta.discourse.org/t/export-document-with-all-content-from-one-topic/256411/4 "2023-02-27T17:41:57Z")

</div>

> [@curi](#):
>
> Is there any query string parameter like per\_page that I can use? I tried that and it didn’t work, but maybe it’s spelled differently.

“Page” size is fixed at 1000. But you can control how many you want in the OS print UI.

Requesting the next page is possible,

> [@Raw of a topic gives only the first ~100 posts](https://meta.discourse.org/t/raw-of-a-topic-gives-only-the-first-100-posts/221044/2):
>
> Append ?page=2 to the URL and so on.

---

<div class="post-metadata">

### Author: ![curi](https://avatars.discourse-cdn.com/v4/letter/c/e68b1a/32.png) [@curi](https://meta.discourse.org/u/curi)
#### Post date: [February 27, 2023, 5:54pm UTC](https://meta.discourse.org/t/export-document-with-all-content-from-one-topic/256411/5 "2023-02-27T17:54:05Z")

</div>

For the /raw/topic-id urls which give markdown formatting, page size is 100, which is a bit short for me. If I could somehow increase that to 1000 it’d be great. My forum has a fair amount of topics with over 100 posts but none over 1000.

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [February 27, 2023, 6:08pm UTC](https://meta.discourse.org/t/export-document-with-all-content-from-one-topic/256411/6 "2023-02-27T18:08:06Z")

</div>

You can request 10 pages in a topic using a script like

`wget https://meta.discourse.org/raw/TOPIC_ID\?page\={1..10}`

---

<div class="post-metadata">

### Author: ![curi](https://avatars.discourse-cdn.com/v4/letter/c/e68b1a/32.png) [@curi](https://meta.discourse.org/u/curi)
#### Post date: [February 27, 2023, 6:25pm UTC](https://meta.discourse.org/t/export-document-with-all-content-from-one-topic/256411/7 "2023-02-27T18:25:19Z")

</div>

Thanks. For anyone else who wants to do this, here is an example set of commands that worked for me:

`mkdir md-dl; cd md-dl`

`wget https://discuss.criticalfallibilism.com/raw/464\?page\={1..3}`

`cat 464* > combined.md`

Downloading extra pages is OK; they just end up blank. But I think the pages will end up out of order if there are more than 9 because, in alphabetical order, 10 comes before 2.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [March 29, 2023, 6:26pm UTC](https://meta.discourse.org/t/export-document-with-all-content-from-one-topic/256411/8 "2023-03-29T18:26:13Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
