Better PDF export / print

A good PDF export makes Anytype a Word replacement :partying_face:

What’s needed?

:page_facing_up: Page formatting

  • Header and footer customizable
    • Page num / all pages
    • copyright
    • title
    • author
    • current chapter
    • date
  • Margins

:clamp: Branding

  • Should be possible to make background (PDF or PNG) template
  • Font should be selectable (at least font type, but better sth like google fonts integration, at the best offline av., downloadable)

:screwdriver: Tools

  • Table of contents
  • Start page

:bulb: Improvements

  • Quality export (currently, for example, spacing between words is displayed, but when copying from pdf it looks like this: itlookslikethis, spaces get lost)
  • Multi-Page PDF, this would be a really killer feature, a selectable amount of page, reordable exporting!!

The way PDF export works are that it renders the markdown on the page into PDF. Allowing for modification would mean changing many things, and This may not be possible even to implement.

@div3xi Some of these might be harder to implement than others but @wemiprog makes a really good point. Anytype is in a good position to compete with many applications including the Office365 suite.

Right now if you do a “print to pdf” of a page it takes snapshots of the app in a specific orientation and gives you a pdf that does not have working links or selectable text. These are must have features if one wants to share a page contents. This is the only way I know of at the moment to export a single page out of the app with all content intact.

Being able to run some sort of export process which lets you add page numbers and header/footer text would be powerful.

You are absolutely correct, It will be challenging to implement, but maybe there could be a window before exporting to pdf where things can be re-arranged without disturbing the current page. This would make a lot of people switch from other services.

Maybe implementing this could be done as a collective community effort when anytype goes open-source, ie. They make their GitHub repository public.

Yeah Im aware how big this effort would be. But I think its worth it, because it opens a new marketing segment, the office replacement. Many users are not really happy with it.

If anytype allows not to use it not only for note taking but note exporting, it would help me to easier convince people around me to use anytype.

Bc’s of that, Id call it a basic feature, otherwise you almost lock in the users, not able to share a document from an amazing app to non users :slight_smile:

Trying to compete on any level with Word is a pretty significant increase of scope for Anytype if you ask me. That said it sounds like a perfect thing for a plugin. I would only want to see the core team tackle this if a plugin were not feasible for some reason.

Also it should be clarified that note “export” is not the same thing as Print-to-PDF nor print formatting in general. Exporting to DOC(X) might be something to add. But it should be based on Anytype features, and I’m not really in favor of seeing Word-like features added to Anytype just for word processor functions, e.g. margins, page headers/footers, etc.

@Oshyan I’m sorry, I dont get you :thinking:

What is the difference between export and Print-to-PDF (ignoring md export)?

And, when you write and export code, export to pdf (cz thats what most application export and evryone can read), you have to specify a margin. Why not expose that var to users for example?

Have a look at this tool: (had to use at work) https://github.com/MaxMelcher/AzureDevOps.WikiPDFExport

There you can easily customize the export. and if the css isnt the default but allows user customization, its fine.

You understand what I mean with my suggestion?

So, its only little more than a basic PDF-Export technically

What I dont except is some sort like “page1 - horizontally, page2 - vertically, page3 - a3 horizontally”, it would be a general setting to not overkill it :slight_smile:

@wemiprog Well, it’s not just about how difficult it is to implement (or not), it’s also about maintenance over time, scope creep, etc. But I’ll admit this is not something I care a lot about myself (the feature I mean), and it’s clear you’re aware of the potential for overdoing it, so I’ll step out of this one. :smile:

Having selectable text and clickable links are a must have for exported PDFs, otherwise this feature does not provide too much of use. Please improve it.

Hej!

There’s a topic about better export (Better PDF export / print), but it is a little bit outdated and no changes in export since that, so… Here’re my thoughts about that.

#### WHAT DO YOU RECOMMEND
I recommend to add several options to Export settings to make final PDFs look more attractive.

#### HOW COULD IT BE DONE
I see the following options that can help
— Page numbering (with option to add number on first page or not)
— Fit content in X pages (to avoid 1-word willl add whole new page)
— Add custom Header and Footer (with option to have separate header and footer for the first/last page)
— Keep external links for Bookmark inline block

REAL WORLD USE CASES

We use Anytype for a wide range of things to organize our life. I’m trying to use it for my job-related notes and memos. It is good, but only if I do not need to share any of these with someone external.

Yes, basically I can export any object as PDF but the final look will be unattractive. 1-2 words does not fit the page? Anytype will create new one instead of slightly changing margins.

I can create a company-related memo in Anytype, but I definitely need it to be branded when exported!

1-page memo looks good, but it would be much more convenient to have page numbering for 17-page one.

When I have bookmarks in my memo, the corresponding links works well, but after export corresponding URLS are gone.

#### RECOMMENDED ALTERNATIVES
I do not see any alternatives here, unfortunately

#### ADDITIONAL CONTEXT
No additional context here

WHAT DO YOU RECOMMEND?

Right now the PDF export feature is quite basic and does not allow for almost any customization.

It would be nice to be able to configure things like:

  • what fonts will be used in the exported PDF (I’m using a Latin Extended alphabet and had some problems with some fonts missing in the system)
  • the font sizes of exported blocks, as for example the Title block is enormous after the export
  • adjust the colour space or just be able to export in black and white (colours in syntax highlighting, mermaid graphs, and so on are not visible after they are printed on paper - but that may be a completely separate issue)
  • margins, as a lot of space is wasted
  • how informations are separated into pages
  • enable auto page numbering
  • remove the scrollbar exported as a black strip (it is not really necessary for it to be there)
  • etc

Bulk PDF export would be handy as well, as right now I’m kind-of stuck with ~100 notes that I’ve to export one-by-one, and then merge using other tool.

HOW COULD IT BE DONE?

The PDF export prompt should be extended to include this features.
Some settings might be global, like for example font family, font sizes, margins, etc.
As for the bulk PDF export, this might be the an additional option when exporting a Set or a Collection.

REAL WORLD USE CASES

Current export functionality leaves user with a PDF file that is not usable, especially if the user is going to print it on paper. A lot of, both horizontal and vertical, space is wasted. Exported text is generally too big. The scroll bar is unnecessary exported.

In my case, I’ve noticed all of the issues with the PDF when I was trying to export my notes to print them in order to create a “book” for studying.

So one of the use cases is in the studying context: someone builds a base of notes from different lectures and then at the end have to export them to PDF in order to study/re-read everything.

I can imagine that actually anyone that uses blocks like code, LaTeX, Mermaid, etc might need to export them at some point in a usable way.

RECOMMENDED ALTERNATIVES

None, really. I mean, you can, if you really have to, export hundreds of notes one-by-one, merge them using other tool and print but the experience is subpar.

ADDITIONAL CONTEXT

None

No matter if we call it a bug, or a missing feature - it’s a major disadvantage of Anytype that
we are simply not able to get the same result on paper as on screen!

What we see on screen:

PDF export (screenshot):

  1. The line breaks occur on different positions.
  2. The colours differ (are missing).
  3. Many other things differ (not shown in this short example).

We can never predict if all visible content on screen fits on one printed page. :frowning:

– How often did it happen, that I needed all content on exactly one single page on paper, but got two pages out of the printer?
– It has happen VERY often! :frowning:

In my opinion this disadvantage wights more then all the other things on the roadmap!
(Although they are also important.)

+1

yeah, and that’s why I might be able to use this… Without page count, header and footer, its a no go for me.

In pact, the layout adjustment does not work much on the width, and although I could work with the background picture on the top of a page, without footer, i am a bit stucks…

I dont know how hard is to implement this, but there is lots of code already available GitHub - AlanBlack92/header-and-footer-example: Here is a header and a footer example , then a template , would help us, for those of us that have to write business docs, instead of writing in different word processor, and upload them .

I was actually just looking for a markdown that could do that, and once anytype can do much more, then I thought I could learn with time, but i am stuck atm with width of the text that wastes a lot of real estate, and header and footer.

Anytype is a great app btw, just not costumized yet.

Two thoughts on the topic:

  • This whole business of someone asking for something and others chiming in "its not important to me’ - it’s not about YOU only. Features can be asked for, but don’t shoot them down because you don’t need them specifically; let the community decide if this particular feature is important to enough people. Priority should always be given to a request that is in big demand and that is aligned with the vision of anyType.

  • As for the export of PDF…would it not be helpful to look into the open source library for LibreOffice? They export to pdf and as far as I can tell do what the OP is asking for. Now I understand the code may not be applicable - but it possibly might. You never know, the code could be well written, a separate piece of code that takes some libreOffice page object and you could replace that object with anyType’s blocks (I know I am simplifying).

I may be off base here, but just anted to make a suggestion

I don’t want to spam the forum, so I won’t introduce a new request.

I think this whole request should be reworked into something more basic and achievable at the beginning. While it is true, it would be nice to have all these features, it feels like too much for Anytype at the moment, maybe in general.

When I was searching for this topic, I found it strange how little there is. Clearly, not an important topic.

Now my proposal is very simple and basic and I would expect it from the very start. PDF is meant to ensure that your document always looks the way you want. If your layout is at 100%, the exported PDF should look just like your Anyblock. Colours, tables and breaks should be at the same place and displayed equally.

My example shows everything you need to know…
Mokrá Tégliková Bábovka.pdf (74.2 KB)

I’ve requested the same thing again and again, but there is little to no hope we will ever get it. :frowning:
See this thread, especially this specific answer from the chief dev.:

Two things I’d like to see with the PDF export.

  1. The ability to export in light mode even when Anytype is in dark mode. I use dark mode, but basically never want to do the PDF export with a black background.
  2. Working table of contents. When I export from word to PDF clicking an item in the table of contents actually works. In the Anytype export having a table of contents is just for show.

I agree that enhancement of the PDF export and print features would bring a huge improvement! Interoperability is a key factor of usability which is often underestimated. In many circumstances traditional office tools are used, because of their prevalence and the control over the output and export they offer. Versatile tools like Anytype stay a silo of information without improvement in this field.

The freedom of data which is a key value of Anytype should also been applied on the single unit, the object, in my opinion. If I can export to PDF with all informations fully visible (all properties), I could use Anytype in a much broader way and also in daily exchange with people not using Anytype (yet).

I am new to anytype but this is one thing I would like, especially for links like the table of contents to work in pdf exports, the rest would be a bonus but this would just make them more functional. I switched to anytype for privacy but I really miss craft’s pdf exports.