SamsungNotes2PDF

Convert handwritten Samsung Notes into clean, shareable PDFs automatically. Samsung Notes exports dark-mode notes with a white background in PDFs, which can make handwritten notes difficult to read. This project automates the process of capturing notes directly from the Samsung Notes app (or scrcpy mirror), processing the images, and generating properly stitched PDF outputs with the original dark appearance preserved.

python python-opencv python-pyautogui
View on GitHub

SamsungNotes2PDF

Convert handwritten Samsung Notes into clean, shareable PDFs automatically.

Samsung Notes exports dark-mode notes with a white background in PDFs, which can make handwritten notes difficult to read. This project automates the process of capturing notes directly from the Samsung Notes app (or scrcpy mirror), processing the images, and generating properly stitched PDF outputs with the original dark appearance preserved.


Features


Example Workflow

  1. Open a note in Samsung Notes
  2. Run the script
  3. The script:
    - captures screenshots
    - scrolls automatically
    - detects page boundaries
    - stitches images together
    - exports final PDFs

Installation

1. Clone the repository

git clone https://github.com/alinanto/SamsungNotes2PDF.git
cd SamsungNotes2PDF

2. Create a virtual environment (recommended)

Windows

python -m venv venv
venv\Scripts\activate

Linux/macOS

python3 -m venv venv
source venv/bin/activate

3. Install dependencies

pip install -r requirements.txt

Requirements


Main Dependencies


Usage

Run the main script:

python salvageNotes.py

Follow the on-screen instructions.

The script may ask you to:


Divider Detection

The script uses RGB color detection instead of arbitrary grayscale matching.

Example divider color:

RGB: (37, 37, 37)
HEX: #252525

Thresholds can be adjusted in the script:

COLOR_TOL
ROW_MATCH_RATIO

Project Structure

SamsungNotes2PDF/
│
├── main.py
├── requirements.txt
├── output/

Known Limitations


Troubleshooting

cv2 not installed

Install OpenCV manually:

pip install opencv-python

Stitching creates repeated regions

Try adjusting:


Script Overview

salvageNotes.py

Main automation pipeline.

Responsible for:

This is the primary script you run.


mergeToPdf.py

Merge PNG images in a folder to a pdf. The main scripts runs this at the end, but can also be used standalone.

python mergeToPdf.py
Enter image folder path: <output_folder_name>

mergeFolders.py

Transfers png images in one folder to another folder taking care of the file indexes in both the folders. This is usefull when you have to merge two partially generated image folders. This usually happens when the script detects blank pages in a single note or if the user input is interfering in between a scroll. Once merged you can directly call the mergeToPdf.py to merge the output png images to pdf.

python mergeFolders.py
Enter input image folder path: <input_folder_name>
Enter output image folder path: <output_folder_name>

python mergeToPdf.py
Enter image folder path: <output_folder_name>

getScreenRegion.py

The main scripts calls this if you select yes when it promts you to change the SCREEN_REGION. It is advised to do this for the initial setup. You can also run this manually to directly get the values for SCREEN_REGION = ( x ,y , width, height ) and then edit in the main script.

getWinColor.py

Utility script for divider color selection. The main script prompts you if you want to change the divider color. if you select yes, then this script is called. You can also run this script manually to get the RBG color for yourself and edit this in the script(better for converting more than one note)

python getWinColor.py

Used to:

Useful when Samsung Notes uses a different theme or divider color.


requirements.txt

Contains all Python dependencies required for the project.

Install them using:

pip install -r requirements.txt

output/

Stores generated outputs:


Automation clicks wrong area

Ensure:


Example use

All my notes converted using this tool and avaliable here:
https://hiddenlayer.ddns.net/#notes

Future Improvements


Contributing

Pull requests and issue reports are welcome.

If you find bugs or have ideas for improvements, open an issue on GitHub.


License

MIT License


Acknowledgements

Inspired by the frustration of Samsung Notes exporting dark-mode handwritten notes with white backgrounds instead of preserving the original appearance.