fern-api / fern

Input OpenAPI. Output SDKs and Docs.
https://buildwithfern.com
Apache License 2.0
2.68k stars 152 forks source link

[Feature] PDF Export Functionality in Documentation #5176

Open ai-yann opened 5 days ago

ai-yann commented 5 days ago

Problem description

The PDF printing functionality (⌘P > "Save as PDF") in Fern's documentation is not working as expected across browsers:

This behavior differs from other documentation sites (e.g., Google Cloud Docs, OpenAI Docs) where the complete documentation is properly saved as a multi-page PDF.

Why would it be useful?

Many users save documentation as PDFs to:

Having consistent PDF export functionality would streamline these workflows and align with user expectations based on other documentation platforms.

Describe the solution

The PDF printing functionality should:

  1. Capture the complete documentation content, not just the visible portion
  2. Work consistently across major browsers (Chrome, Safari)
  3. Generate properly formatted multi-page PDFs
  4. Match the behavior seen on other documentation platforms

Additional context

chat_cohere chat_cohere_safari
dannysheridan commented 1 day ago

Hey @ai-yann -- it sounds like the most important use case is Provide context to LLM conversations given you mentioned it first and it's a feature request we've been hearing from other users of Fern Docs.

We're prototyping a new feature that allows you to add .mdx to the end of any page and it will spit out the underlying markdown. Example: https://docs.cohere.com/docs/preambles.mdx

Does this solve the problem you're after?

dannysheridan commented 1 day ago

We're planning to support the proposal from https://llmstxt.org/ of having docs.cohere.com/llms.txt and/or docs.cohere.com/llms-full.txt

I anticipate we will do this in .txt. and .mdx but am open to input.

ai-yann commented 1 day ago

This sounds great. My personal favorite is .txt because it is the most widely accepted file extension accepted by chatbots. When dealing with .mdx I usually need to remove the x or even change it to .txt entirely, for the chatbot to accept it, depending on which I'm using.