Skip to content

[FEATURE] Generate QR for links #3859

Open

Description

@sciurius

Is your feature request related to a problem? Please describe.

It is just a thought, and may require some discussion.

A clear and concise description of what the problem is.

When a document has a link, e.g.

 [Musician](https://johanvromans.nl)

I can invoke the link in the editor, and in a generated PDF. However, when the purpose of the document is to be printed, the links are useless and get in the way.

Describe the solution you'd like

I was just wondering whether there would be a possibility to specify that links should not be rendered (in the PDF) as links, but as a QR image in the margin.

Describe alternatives you've considered

I can manually create QR images and include them in the document, but that is cumbersome.

Activity

  1. added
    Type: Feature
    on Nov 19, 2026
  2. added and removed
    Type: Feature
    on Nov 19, 2026
  3. pbek commented on Nov 19, 2026

    @pbek
    Owner

    That sounds more like an idea for a script, not something to integrate into QOwnNotes. 🤔

  4. sciurius commented on Nov 19, 2026

    @sciurius
    ContributorAuthor

    I've thought of that, but I couldn't envision how to do that.

    A script could physically modify the document to use links to images instead of links, and generate QR code images. That is not really what I'm looking for.

    Is there a 'PDF Export' hook where a script could make these modifications on the fly (without physically altering the source document)?

    Alternatively, generating PDF with an external tool would problably most flexible and powerful. That would also allow for more output control like headings/footers and page breaks etc.. Not that I know of such a tool.

  5. pbek commented on Nov 20, 2026

    @pbek
    Owner

    You wouldn't have to change the note itself. There isn't a PDF-only hook, but there is a noteToMarkdownHtmlHook(note, html, forExport) that can rewrite the rendered HTML on the fly. That would be enough for inline QR codes or a numbered list of codes at the end. The catch is that forExport also applies to HTML export, and Markdown PDF export and printing pass the “Use internal export styling” setting as its value. It isn't a reliable way to target just PDF, and Qt's rich-text renderer isn't a good fit for placing QR codes in the actual page margin.

    For the margin layout, I'd make a script repository script with a separate Export PDF with QR links action. The QML script would register the menu action, ask where to save the PDF, and pass the current note's Markdown to a local exporter without writing anything back to the note.

    I'd try Pandoc + LaTeX for that exporter. A Pandoc Lua filter would work on parsed links: [Musician](https://johanvromans.nl) would become plain “Musician” in the body, with a QR code for the URL in the margin. I'd start with just http and https links and leave internal note links alone. LaTeX can generate the codes locally with qrcode, so there'd be no QR service or image files to maintain in the note folder. The PDF template could also control headers, footers, and page breaks. The regular preview, printing, and PDF export would stay as they are.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions