Hi, I’ve been discussing this idea in the GSoC category earlier.
This is my full proposal draft based on that discussion.
Links
Github: ddg22004
Project Size: Medium
Pull Requests for Joplin:
To understand the Joplin Codebase better I worked on identifying issues (#14522 and #14672 ) and also worked on existing issues out of which I submitted two pull requests.
#14691 : Fixes #14660 Text inputs are disabled after re-encrypt notes dialog journey
desktop (Merged)
#14672: Fixes #14661 Disables the New Note and New To Do button until a notebook is created. ( Closed)
1. Introduction
Name: Dev Gupta
College: Indian Institute of Information Technology Surat (IIIT Surat), India
Degree: Bachelor of Technology in Computer Science and Engineering
Year: 4th Year
Email Address: devdgupta22@gmail.com
Hi Joplin Team!
I’m Dev Gupta, a final year student pursuing B.Tech in Computer Science and Engineering from Indian Institute of Information Technology Surat. I started programming in my 2nd year of college where I learnt about Javascript and overtime developed full stack applications using React and Node Js.
1.1 Projects and Experience
-
Prep Tech — AI Interview Preparation Platform Github Link
Developed an AI-powered interview preparation platform designed to help students explore and prepare for careers in domains such as DevOps, Full Stack Development, and other technology fields. The platform provided structured learning support through curated notes, recommended courses, and field-specific guidance. Built using the MERN stack, the project focused on creating an accessible and interactive learning experience for students preparing for technical careers.
-
Wallet Watch — Expense Tracker Github Link
Built a personal finance and expense tracking application that enabled users to record, manage, and analyze their spending habits. The platform included data visualization features such as graphs and dashboards to present spending patterns in an intuitive way. The project was developed using MERN Stack.
-
Research Project — Deserialization Attacks in Federated Learning
Worked on a research project that focused on deserialization attacks in federated learning systems, this work focused on vulnerabilities arising from the use of pickle files which is used in python for serializing model formats in open-source environments. The research explored how insecure deserialization mechanisms can be exploited, the risks they introduce in distributed machine learning systems and their broader implications for the security of federated learning frameworks.
This research paper was published in the 18th International Conference on COMmunication Systems and NETworks (COMSNETS).
1.2 Open Source Experience
I am new to open-source contributions, but I have developed a strong interest in exploring and understanding open-source systems through my academic and project work. In particular, my research on Deserialization Attacks in Federated Learning involved studying vulnerabilities in open-source Federated Learning frameworks , which strengthened my understanding of how open-source software is built, used, and secured. I am eager to expand this exposure into active contribution and collaborative development.
2. Project Summary
Note sharing is a fundamental feature that is useful for collaboration especially in education and teams using cross-device setups. An application that emphasizes privacy-preserving note-taking becomes easier for users to adopt when note sharing is simple and requires minimal effort from the user.
Before understanding the exact goals for the project , understanding the current context of how the application shares the notes is important.
In the Joplin Mobile Application, Currently there exist two ways to share notes:
-
The current implementation of note sharing is using a native OS Share which is triggered using share_onPress function in Note.tsx this is a method which enables notes sharing in supported platforms or applications that the user has but it copies the Title and Body of the notes.
-
Publishing the Note, this generates a Public URL for the note which can be copied to the clipboard. This is for the Joplin Cloud Users.
However, the application lacks structured and user-friendly sharing options such as PDF export and formatted note sharing which are often required by Mobile users.
The desktop version of Joplin supports exporting notes in multiple formats that include HTML and PDF as well. This creates a clear gap in functionality between desktop and mobile platforms.
This project aims to solve these issues by introducing a unified note export and sharing system on mobile. The approach focuses on designing a modular system that converts notes into a structured intermediate representation (HTML) using existing renderer which can then be reused across multiple export and sharing workflows for PDF generation and email sharing.
The proposed approach prioritizes:
-
A consistent formatting across various export formats
-
Memory-efficient handling of resources by avoiding base64 embedding particularly during HTML construction
-
Robust handling of real-world constraints such as encrypted notes, large attachments, and unsupported file types
2.1 Project Goals
The primary goal of this project is to introduce a unified note export pipeline in the mobile application, which enables consistent formatting and reuse across multiple sharing mechanisms.
-
Unified Sharing UI Integration
-
Adding note-level actions:
-
Export as PDF
-
Share via Email
-
-
-
Note-Level PDF Export
-
Implementation of exporting individual notes as PDF within Joplin Mobile
-
Preserving formatting from Markdown/Rich Text.
-
Enable local download and sharing via device storage.
-
-
Email-Based Note Sharing
-
Integrate email sharing using system email clients
-
Attach generated PDF with
-
Pre-filled subject
-
Optional Message Body
-
-
-
Design a modular export pipeline that can be reused for other formats
-
Ensure efficient handling of images and attachments
-
Maintain consistency with Joplin’s existing architecture
-
Handle edge cases like:
-
Encrypted notes
-
Very large notes and attachments
-
Unsupported file types
-
2.2 Out of Scope
Plugin-generated content presents challenges because it relies on runtime execution and limited plugin support on mobile platforms.
This project will prioritize exporting content rendered through Joplin’s native renderer to ensure consistency and reliability.
For plugin-dependent content, a fallback strategy will be used:
-
Pre-rendered plugin output (if available in HTML) will be included
-
Unsupported dynamic content will be replaced with a placeholder or safe textual representation
Additionally, users will be notified when exporting notes containing plugin-dependent elements to avoid unexpected output discrepancies.
Multi-note PDF merging is excluded from the current scope due to the additional complexity involved in ordering, formatting and memory management when combining multiple notes into a single document.
The current project focuses on building a single-note export pipeline, which serves as a foundational step.
The proposed modular pipeline can be extended in the future to support multi-note export by:
- Iterating over multiple notes
- Generating intermediate HTML representations
- Merging them with structured separators before PDF generation
Notebook-wide export is considered out of scope due to scalability and performance concerns, especially on mobile devices.
Exporting an entire notebook introduces challenges such as:
-
Handling a large number of notes efficiently
-
Increased memory and processing overhead
-
Managing deeply nested notes
Instead, this project prioritizes efficient and reliable single-note export, ensuring correctness and performance at a smaller scale.
The architecture is designed to support future notebook-level export by:
-
Reusing the export pipeline for each note
-
Introducing batching or streaming mechanisms
3. Technical Architecture
The proposed solution will follow a simple and modular design in the client side architecture. The system introduces an export pipeline where notes are first converted into a structured HTML representation using Joplin’s existing renderer.
This intermediate representation is then reused across multiple sharing workflows such as PDF export and email sharing, ensuring consistency in formatting and structure. The below mentioned components will be designed to implement a unified note export and sharing system.
Data Flow Diagram
Input & Data Preparation Phase
Processing Pipeline Phase
PDF Generation Module Phase
Sharing and Email Module Phase
The pipeline is divided into multiple phases where each stage performs a specific transformation:
-
The process begins with user interaction and data extraction from the selected note.
-
The note is then converted into clean HTML using Joplin’s renderer.
-
This HTML is incrementally processed to resolve resources and links.
-
The processed HTML is styled and converted into a PDF.
-
Finally, the generated file is shared or sent via email, followed by cleanup.
This phased approach ensures separation of concerns and avoids heavy processing like full HTML packing or base64 embedding.
3.1 Export Pipeline
- Rendering Phase
The note will be converted into HTML using Joplin’s renderer. This is done to ensure that the export process works with structured note data rather than relying on WebView content.
- Parsing Phase
HTML is parsed into a structured representation to enable controlled handling of elements such as images, links and attachments.
- Resource Resolution Phase
All internal resource references (like images using joplin-content://) will be identified.
-
Each resource is resolved using Joplin’s Resource model to its actual local file path
-
Resources are copied into a temporary export directory
-
HTML references are rewritten to point to these local files
This approach minimizes reliance on base64 embedding and improves memory efficiency.
- Internal Link Resolution Phase
Joplin internal note links (e.g., :/noteId) are not valid outside the application and must be handled explicitly.
-
Internal links are detected and processed
-
They are converted into safe alternatives (e.g., plain text or non-clickable links)
This ensures exported content does not contain broken or invalid links.
- External Link Handling
External links (https://) will remain unchanged, ensuring web navigation in exported content.
A separate print-friendly CSS will be applied.
-
Ensures proper styling,margins and layout
-
Supports pagination for PDF
-
Avoids complex CSS that may break in PDF rendering
-
Export Phase:
The processed HTML is converted into a PDF in a platform specific WebView:
-
Load the processed HTML in a platform-specific WebView:
-
iOS: WKWebView → UIPrintPageRenderer
-
Android: WebView → PrintDocumentAdapter
-
-
Generate PDF directly from the rendered content.
-
Store the PDF in temporary/app cache storage.
-
Cleanup Phase
All temporary files created during export are removed after the process is completed to avoid storage issues.
3.2 Changes to Joplin Codebase
UI Layer changes would primarily be in NoteScreen.tsx
-
Toolbar options:
-
In the public menuOptions() new options of Share as PDF and Email as PDF will be added.
-
In ScreenHeader component Icons for PDF and Email will be added for Quick access buttons.
-
-
New handler functions will be introduced to trigger the service
-
Share as PDF Handler Method
-
Email Note Handler Method
-
-
Reusing existing sharing utilities in sharing services.
The following service modules will be introduced:
-
Export Service
Acts as the central orchestrator for the export pipeline -
PDF Service
Responsible for generating PDF output from processed HTML -
HTML Processor
Handles structured processing of rendered HTML -
Resource Resolver
Resolves and manages note resources (images, attachments) -
Link Resolver
Processes internal and external links for export compatibility
-
Existing sharing mechanisms (sharePath) will be used
-
Email sharing will leverage platform-supported sharing interfaces
-
File handling will use existing abstractions like shim.fsDriver()
3.3 Implementation and Technologies/Libraries :
The explanation below outlines the step-by-step approach for implementing each of these functionalities.
-
Share as PDF :
-
Notes will be rendered using Joplin’s existing Markdown-to-HTML renderer.
-
This rendered content will be wrapped into a complete HTML document.
-
The processed HTML will be rendered using platform-native WebView-based PDF generation mechanisms.
-
The generated PDF will be stored in temporary storage.
-
The existing file sharing mechanism (sharePath) will be reused to allow users to download or share the PDF.
-
-
Email Note :
-
The note will be first converted into a PDF.
-
The mail icon will be added to the Note Toolbar for that.
-
The react-native-share library will be used to invoke the device’s email client.
-
The email will be pre-filled with:
-
Subject (note title)
-
Body
-
PDF attachment
-
-
-
Retry options for failed operations.
-
If PDF generation fails , fallback to the existing sharing mechanism.
-
User-friendly alerts for:
-
PDF generation failures
-
missing resources
-
permission issues
-
All processing is done locally
-
No external data transfer without user action
-
Temporary files are cleaned after use
-
Works on Android and iOS
-
Uses shim.fsDriver() for file handling abstraction
-
Handles platform-specific file paths and permissions
-
Sharing behavior validated across platforms
3.4 Potential Challenges
While working on this project there will be technical and integration challenges:
-
Handling large notes and attachments without memory issues
-
Correct resolution of all resource and link types
-
Ensuring consistent PDF rendering across platforms
-
Integrating export functionality without breaking existing rendering modes
-
Handling encrypted notes (export only after decryption)
-
Email client inconsistencies across devices
3.5 Testing Strategies
The following testing strategy is created keeping in mind the overall workflow of the project to ensure proper functioning and reliability of the proposed sharing system.
-
Unit Testing
-
Validate HTML generation
-
Test resource resolution logic
-
Verify PDF generation
-
-
Integration Testing
-
Email sharing functionality
-
End-to-end workflow:
-
-
Markdown → HTML → PDF → Share
-
Cross-platform Testing:
-
Validate behavior on Android and iOS
-
Ensure file accessibility and sharing compatibility
-
-
Edge Case Testing
-
Encrypted notes
-
Very large notes and attachments
-
Missing or unsupported resources
-
Internal links
-
-
Cleanup Testing
- Ensuring temporary files are properly cleaned after use.
3.6 Documentation Plan
User Documentation:
-
Steps to export notes as PDF
-
How to share notes via email
Developer Documentation:
-
Export pipeline architecture and flow
-
Service modules and handler functions
-
Guidelines for extending export functionality
4. Timeline
Week 1-2 : Codebase Understanding & Pipeline Setup
-
Study Joplin architecture (Note, Resource, renderer, fsDriver).
-
Implement basic pipeline: Note → HTML.
-
Setup Export Service structure
Week 3-4 : HTML Parsing & Resource Handling
- Parse HTML. Handle images & attachments (:/resourceId).
- Resolve resources, copy to temp directory, rewrite paths.
- Unit tests for resource handling.
Week 5 : Internal Link Handling & Validation
-
Detecting internal links (:/noteId).
-
Convert to safe format (non-clickable/text).
-
Add validation for missing resources and broken links.
Week 6 : PDF Generation (Midterm Milestone)
-
Generate PDF from processed HTML.
-
Store in temp storage.
-
Midterm demo ready.
Week 7 : Buffer (Midterm)
-
Fix bugs from PDF generation
-
Address mentor feedback.
Week 8: Sharing and Email Integration
-
Implement sharing functionality.
-
Integrate email via react-native-share.
-
Attach generated PDF to email.
Week 9 : UI Integration
-
Update NoteScreen.tsx.
-
Add “Share as PDF” and “Email as PDF” options.
-
Add toolbar icons and connect handlers to the pipeline.
Week 10 : Functionality Optimization
-
Test large notes and attachments.
-
Optimize memory usage.
-
Add warnings for large exports and missing resources.
Week 11 : Testing and Cross-platform Validation
-
End-to-end testing (Markdown → HTML → PDF → Share).
-
Validate on Android & iOS.
-
Fix platform-specific issues.
Week 12: Buffer + Final Documentation
-
Bug fixing.
-
Write documentation.
-
Final submission.
5. Deliverables
-
Core Functional Deliverables
-
Note-level PDF export
Ability to export well-formatted PDF files using a structured HTML-to-PDF pipeline. -
Unified export pipeline
Implementation of a modular export system that converts notes from Markdown → HTML → processed HTML, enabling reuse across multiple sharing workflows.
-
-
Content Processing Deliverables
-
Resource handling (images & attachments)
Proper resolution of all note resources (images, files) by converting :/resourceId references into local file paths and ensuring they are correctly included in exported output. -
Internal link handling
Detection and safe transformation of internal note links (:/noteId) to prevent broken links in exported content, with support for future extensibility (multi-note export).
-
-
Sharing Features
-
Email sharing integration
Ability to share exported notes as PDF attachments via device email clients with pre-filled subject and metadata. -
System sharing support
Integration with existing Joplin sharing mechanisms to allow users to share generated PDF files across apps.
-
-
User Interface Enhancements
- Toolbar and menu integration
Addition of “Share as PDF” and “Email as PDF” options within the note screen (NoteScreen.tsx), including quick-access toolbar actions.
- Toolbar and menu integration
-
Testing Deliverables
-
Unit tests for HTML parsing, resource resolution, and link handling
-
Integration tests for full pipeline (Markdown → HTML → PDF → Share)
-
Cross-platform testing on Android and iOS
-
-
Cross-platform compatibility: Working implementation on both Android and iOS.
-
Documentation: Developer documentation and usage guide.
6. Availability
I plan to dedicate 35–45 hours per week to this project. Kindly note that my end semester presentations will be around the end of May or start of June which coincides with the start of the coding period. During this time, I may be able to commit 2–3 hours per day to the project.
Time Zone: Indian Standard Time (UTC +5:30)
To conclude, I have provided the overall details on how I plan to implement the project. I am fully committed to Joplin and will not be submitting proposals to other organizations. My goal is to learn more about the technology stack and contribute to open source software.
Thank you for your time and consideration.



