Generate text or use your own
Use the supplied Ollama example, your own local model or plain text from an application. The Python SDK needs no cloud account or API key.
pasteToPrint Local · Developer preview
Put local AI output on paper. Turn text into a structured A4 PDF, choose a printer and approve the exact job before it enters the print queue.
Local processing after setup. Physical printing available on Windows 10/11.
A clear document, ready to print on A4
Review the PDF, printer and number of copies in the Windows confirmation window.
Waiting for your confirmationOne local renderer connects your model, application and printer.
Use the supplied Ollama example, your own local model or plain text from an application. The Python SDK needs no cloud account or API key.
Convert text or PTDF semantic blocks with the existing pasteToPrint renderer. Fonts, page layout and PDF generation stay on your computer. Network requests are blocked during rendering.
Choose an installed printer and 1–99 copies. A native Windows window asks for your confirmation before submission. Track the job in the queue using its actual print job ID.
These examples use the downloadable packages once installed. The printing example opens a confirmation window every time.
from pastetoprint import LocalPdfClient
pdf = LocalPdfClient().render_text(
"Completed: 10 inspections. Remaining: 2.",
"report.pdf",
title="Monthly report",
template="business",
)
print(pdf.path)from pastetoprint import LocalPdfClient
from pastetoprint.ollama import OllamaClient
text = OllamaClient().generate(
model="gemma3:1b",
prompt="Write a short report from these sample figures: 12 planned inspections, 10 completed, 2 remaining.",
)
pdf = LocalPdfClient().render_text(
text, "ai-report.pdf",
title="Monthly report",
template="business",
)
print(pdf.path)from pastetoprint import PrintManager
printing = PrintManager()
job = printing.prepare(
"report.pdf",
printer="Your printer name",
copies=1,
idempotency_key="monthly-report-001",
)
job = printing.submit(job.ticket_id)
for change in printing.watch(
job.ticket_id, timeout_seconds=60
):
print(change.as_dict())Creating a PDF does not authorize printing. The confirmation window shows the file, printer, page count and number of copies. The default answer is “No”; the SDK offers no way to confirm without user interaction.
A persistent local record links each request key to one job and also checks for matching PDF content and settings. Jobs with an uncertain outcome are not automatically resent. An intentional repeat requires a new confirmation.
Track jobs as they wait, print, pause or encounter errors. Acceptance into the queue does not prove that paper came out. If the outcome cannot be established, the SDK reports an unknown state.
The standalone MCP server connects an AI assistant to Document API v2 using PTDF. It uses a hosted API endpoint by default and does not automatically call the offline PDF or printing module. For a local deployment, configure a local API endpoint it can reach.
Explore MCP and the Document APIPDF generation requires Python 3.10+, Node.js 20+ and an installed Chrome, Edge or Chromium browser. Physical printing also requires Windows 10/11, an interactive desktop session and an installed printer that supports A4.
For the AI example, install Ollama and download a local model in advance. Restart Ollama with cloud features disabled. The SDK checks this before sending a prompt and refuses cloud model aliases.
The bundled fonts cover Latin, extended Latin and symbols. Test your document language and printer before production use; the 48 website languages are not a guarantee of full PDF font coverage.
Extract the toolkit into a working folder. Install the required runtimes and browser first. The archive does not include Node dependencies, a browser or AI model weights. Prepare these before disconnecting from the internet.
Run these commands in PowerShell from the extracted folder. The first command downloads the PDF module dependency during setup. The Python wheel package installs without contacting a package index.
npm.cmd install --ignore-scripts ./packages/pastetoprint-local-pdf-0.1.0.tgz
python -m pip install --no-index --no-deps ./packages/pastetoprint_sdk-0.2.0-py3-none-any.whl
$env:PASTETOPRINT_PDF_MODULE = (Resolve-Path "./node_modules/@pastetoprint/local-pdf").Path
python ./examples/text_to_pdf.pyOpen the included sample PDF or run the Python example. To use Ollama, prepare the model and start the server with cloud features disabled. To print, list your printers, enter the exact printer name and confirm the job in the Windows window.
pastetoprint-print printers
pastetoprint-print print report.pdf --printer "Your printer name" --copies 1 --key monthly-report-001Developer preview
Download the current development packages directly. They have not yet been published to npm or PyPI. The toolkit includes installation notes and examples, and the packages retain their original third-party notices.
Python SDK + local PDF module + MCP server + guides and samples
0ea72a6b8d7900d0464c31e650acce9a82fbacb4389efeda61671b32e874bed58dec088ee6f7409370e63bdad3895ec31d96e1fe943a3ba32f47c165425e2e4c1ed340b28f2a23652b996866cf736fe15f1fa3eb6c8de6d4815ebbbfcc1471f1d6eb348e546a34713a243d5048796ddf6013122f3cb4a47d5e1e66bded2b9867Yes. The local Python → PDF → Windows printing workflow runs offline once all dependencies, the browser and any Ollama model are prepared. It uses no cloud renderer. Initial setup may require downloads. The separate MCP bridge uses its own configured API endpoint.
No. This page provides downloads and code examples. Printing runs through the installed local SDK. Each prepared job requires a new, visible confirmation in a Windows window.
The current print module supports Windows 10/11 with a desktop session and an installed printer. It prints single-sided A4, scaling the content to the printable area. This release does not include physical printing on macOS or Linux.
This is a developer preview with mandatory human confirmation. Test your own printer, documents, fonts and local data handling. Automated tests and native read-only checks do not replace an approved physical print test on your hardware.
Start with the local PDF sample, then connect your model and printer.