Large open-source repositories often organize documentation across dozens of nested directories. Manually locating, downloading, and converting each Markdown file into a readable PDF takes hours. With md2pdf, you can inspect entire repository file trees directly from your browser and select exactly what you need.
This guide explains how md2pdf parses repository file trees, navigates multi-level folder structures, and prepares your technical documents for high-resolution PDF generation.
How GitHub Repository Tree Parsing Works
When you enter a public repository URL into md2pdf, the client queries GitHub’s public API to retrieve the Git tree reference. Rather than downloading the entire repository archive, md2pdf queries only the tree metadata required to render the interactive file explorer.
Every file entry is evaluated against supported Markdown extensions, including .md, .markdown, .mdown, and .mkd. Non-documentation assets are filtered out of the tree view, giving you a clean, distraction-free view of all available documentation.
# Expected GitHub repository tree representation
docs/
├── architecture/
│ ├── overview.md
│ └── data-flow.md
├── guides/
│ ├── getting-started.md
│ └── deployment.md
└── api-reference.md
Navigating Nested Folders and File Hierarchies
Complex software projects distribute technical guides across functional areas. The md2pdf interface presents an expandable directory tree where you can drill down into subdirectories without leaving the page.
- Expanding and Collapsing Nodes: Click on folder names to toggle visibility. Nested folders preserve their hierarchy so you never lose context.
- Directory Breadcrumbs: The explorer displays complete relative paths, clarifying where each document belongs in the project structure.
- File Size and Metadata: Quickly verify file presence and verify that the target documentation is populated before initiating conversion.
Selecting Markdown Files Across Multiple Directories
You do not need to convert every file in a repository. md2pdf gives you complete control over document selection:
- Selective Picking: Check specific files in different directories to compile a customized reading list.
- Folder Toggles: Click a folder checkbox to select or deselect all descendant Markdown files with a single action.
- Cross-Directory Merging: Combine guides from
docs/,tutorials/, and the rootREADME.mdinto a single cohesive compilation.
Client-Side Security and Rate Limit Optimization
md2pdf executes all tree queries and content downloads directly in your web browser. No personal access tokens or repository data are ever forwarded to external application servers.
For unauthenticated sessions, GitHub allows up to 60 requests per hour per IP address. md2pdf optimizes API utilization by bundling tree requests into recursive git-tree queries, ensuring smooth browsing even in large repositories.
Converting Your Selected Tree to PDF
Once you have selected your target Markdown files, click the compile button to render your documents. You can choose to generate individual PDFs packaged in a ZIP archive or merge all selected chapters into a single book complete with a table of contents and consistent page numbering.
Make your own README PDF
Free, no login, and entirely client-side.