10000 Single HTML file of a book · Issue #85 · retypeapp/retype · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Single HTML file of a book #85

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
geoffreymcgill opened this issue Jul 21, 2021 Discussed in #84 · 14 comments
Open

Single HTML file of a book #85

geoffreymcgill opened this issue Jul 21, 2021 Discussed in #84 · 14 comments
Assignees
Labels

Comments

@geoffreymcgill
Copy link
Collaborator

Discussed in #84

Originally posted by larmarange July 21, 2021
Do you have any plan for allowing to generate (in addition of the website) an HTML file (ideally self-contained) containing all the book allowing to propose to readers to download the overall book and/or to print it as a PDF with their browser.

@geoffreymcgill
Copy link
Collaborator Author
geoffreymcgill commented Jul 21, 2021

Yes, 100% this is happening. I've had on my TODO list since the beginning of Retype.

We will be providing several print friendly, file download, and eBook download options. This will include:

  1. Print friendly stylesheet, so printing any individual page directly from the browser looks awesome
  2. A per page .pdf download option
  3. An entire content (the "Book") in at least several different formats:
    1. .epub (all content)
    2. .ibooks (might not be required)
    3. .pdf (per page & all book)
    4. .html (might not be required)

We haven't started on any of these features yet, but they are technically trivial for us to implement. Most of the development time will be taken up with UI design and testing.

I'm not exactly sure what release the above (or some of the above) features will be implemented, but it is a priority.

We're a small team and working our way through all the feature requests as fast as we can. That said, all of the above will supported by Retype.

Hope this helps answer your questions.

@geoffreymcgill geoffreymcgill added this to the v1.10 milestone Jul 21, 2021
@larmarange
Copy link

Yes thanks. That would be great

@Zerotask
Copy link
Zerotask commented Feb 11, 2022

Any updates on this issue?
I'm really looking forward for an option to build the documentation as a single pdf file.

@arminus
Copy link
arminus commented Apr 5, 2022

Looking forward to this, too. Does anyone see a "hacked" (pandoc?) way of getting something out, even if not perfect?

@DannyBen
Copy link
DannyBen commented Apr 5, 2022

Does anyone see a "hacked" (pandoc?) way of getting something out, even if not perfect?

There should be a relative easy way to hack something up.

  1. A script that iterates over the files, and removes or modifies all non-standard markdown elements
  2. Then, it concatenates the output to a single markdown file
  3. Then, you can just preview it with any markdown previewer - personally, I am using my own CLI to preview READMEs (madman and save the HTML, or use any other "markdown to HTML" conversion technique.

The bigger challenge, would be to convert the non standard markdown elements.

Another similar approach, would be to

  1. Write a script that iterates and concats all your markdown files, and saves the output back to the source folder
  2. Open the result in Retype... :)

@mudgen
Copy link
mudgen commented Sep 2, 2022

@geoffreymcgill No PDF support is preventing me from using Retype

@p0fi
Copy link
p0fi commented Jan 24, 2023

Any updates on PDF support? This is really the missing thing here!

@DannyBen
Copy link

Converting individual markdown files into one cohesive PDF book is not a trivial task.

From dev perspective, it involves two tasks:

Task 1: Concatenating markdowns, which will require:

  • Having a new template that understands "pages", has a Table of Contents and other elements in preparation for PDF export.
  • Being able to adjust all links to be inter 8000 nal
  • Being able to adjust all header links, to distinguish from one another.
  • More

Task 2: Converting markdown to HTML and then to PDF

While it can be done in a server environment (one that render server-side markdown to HTML), it is - to my knowledge - quite impossible to do on a client side, without bringing in bloated software to do so.

Personally, I do not know of any other documentation tool generator that does that - I would love to be enlightened if there is any.

I believe the only course of action for Retype developers (if any) is to render a special HTML page (say "my-retype-site.com/book"), which will create the HTML render of everything (i.e. Task 1), and then the user can use their already available "Download as PDF" in Chrome or other modern browser.

@p0fi
Copy link
p0fi commented Jan 24, 2023

Im well aware that this is not trivial, it's a really important feature nevertheless in my eyes.

Personally, I do not know of any other documentation tool generator that does that - I would love to be enlightened if there is any.

Gitbook does that. See Gitbook Docs – PDF Export

@DannyBen
Copy link

I understand. But Gitbook is a hosted service, retype is a static site generator.

@lnarynskyyi
Copy link
  • Print friendly stylesheet, so printing any individual page directly from the browser looks awesome

  • A per page .pdf download option

  • An entire content (the "Book") in at least several different formats:

    1. .epub (all content)
    2. .ibooks (might not be required)
    3. .pdf (per page & all book)
    4. .html (might not be required)

I understand the additional complexity involved in # 3 (entire "book"), but the first two points seem much more trivial. Since Retype doesn't currently support at-rules @page { @top-right {...}} it's damn near impossible to get a nice printout of a single article.

Any updates on this @geoffreymcgill?

@geoffreymcgill
Copy link
Collaborator Author

@p0fi Nice. Thanks for that.

@ApolonTorq
Copy link

Just an FYI. Refer to #628 for a somewhat "hacky" workaround that can be used as an interim measure for single page pdfs.

@geoffreymcgill
Copy link
Collaborator Author
geoffreymcgill commented May 21, 2025
  1. Print friendly stylesheet, so printing any individual page directly from the browser looks awesome

A bunch of work has gone into make a print friendly stylesheet for the page and the pages are definitely printing much better now.

The new print friendly stylesheet will be included in the upcoming v3.9.0 release.

If you notice any issues with the print formatting, please let us know.

  1. A per page .pdf download option
  2. An entire content (the "Book") in at least several different formats

Generation and download of a .pdf has not been implemented, yet. This functionality is still a high priority for us, but it will have to wait for a future release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

9 participants
0