Generate text or use your own
Use di Ollama example wey follow, your own local model or plain text from an application. Python SDK no need cloud account or API key.
pasteToPrint Local · Developer preview
Carry local AI output go paper. Turn text to well-arranged A4 PDF, choose printer and approve di exact job before e enter di print queue.
After setup, processing dey happen for your computer. Physical printing dey available for Windows 10/11.
Clear document wey ready for A4
Check di PDF, printer and number of copies inside di Windows confirmation window.
E dey wait for your confirmationOne local renderer dey connect your model, application and printer.
Use di Ollama example wey follow, your own local model or plain text from an application. Python SDK no need cloud account or API key.
Convert text or PTDF semantic blocks with di existing pasteToPrint renderer. Fonts, page layout and PDF generation dey stay for your computer. Network requests no fit pass while rendering dey happen.
Choose an installed printer and 1–99 copies. Di native Windows window go ask you to confirm before e send di job. Use di actual print job ID to follow am for di queue.
After installation, these examples dey use di packages wey you download. Di print example go open confirmation window every time.
from pastetoprint import LocalPdfClient
pdf = LocalPdfClient().render_text(
"10 inspections don finish. 2 still remain.",
"report.pdf",
title="Report for di month",
template="business",
)
print(pdf.path)from pastetoprint import LocalPdfClient
from pastetoprint.ollama import OllamaClient
text = OllamaClient().generate(
model="gemma3:1b",
prompt="Write short report from these sample figures: 12 inspections planned, 10 don finish, 2 remain.",
)
pdf = LocalPdfClient().render_text(
text, "ai-report.pdf",
title="Report for di month",
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())To create PDF no mean say you don approve printing. Di confirmation window go show file, printer, page count and number of copies. Di default answer na “No”; SDK no get option to confirm without user action.
Permanent local record go link each request key to one job and check whether PDF content and settings match. If job outcome no clear, e no go send di job again by itself. Deliberate repeat need fresh confirmation.
Follow jobs as dem dey queue, print, pause or get error. If queue accept job, e no prove say paper don come out. If SDK no fit know di outcome, e go report unknown state.
Di standalone MCP server dey connect AI assistant to Document API v2 through PTDF. Di default API endpoint dey hosted; e no automatically use di offline PDF or print module. For local deployment, configure local API wey e fit reach.
See MCP and Document APITo generate PDF, you need Python 3.10+, Node.js 20+ and installed Chrome, Edge or Chromium. Physical printing also need Windows 10/11, interactive desktop session and installed printer wey support A4.
For di AI example, install Ollama and download local model ahead of time. Turn cloud features off and restart Ollama. SDK go check this setting before e send prompt, and e no go accept cloud model aliases.
Di fonts wey follow cover Latin, extended Latin and symbols. Test your document language and printer before real work; di 48 website languages no guarantee say PDF fonts cover every language.
Unpack di toolkit inside a working folder. Install di required runtimes and browser first. Di archive no contain Node dependencies, browser or AI model weights. Prepare them before you disconnect internet.
Run these commands for PowerShell from di unpacked folder. Di first command go download di PDF module dependency during setup. Di Python wheel package go install without contacting 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 di sample PDF wey follow or run di Python example. For Ollama, prepare di model and start di server with cloud features off. To print, list your printers, enter di exact printer name and confirm di job for di Windows window.
pastetoprint-print printers
pastetoprint-print print report.pdf --printer "Your printer name" --copies 1 --key monthly-report-001Developer preview
Download di current development packages directly. Dem never publish these packages for npm or PyPI yet. Di toolkit get installation notes and examples; di packages still contain their original third-party notices.
Python SDK + local PDF module + MCP server + guides and samples
0ea72a6b8d7900d0464c31e650acce9a82fbacb4389efeda61671b32e874bed58dec088ee6f7409370e63bdad3895ec31d96e1fe943a3ba32f47c165425e2e4c1ed340b28f2a23652b996866cf736fe15f1fa3eb6c8de6d4815ebbbfcc1471f1d6eb348e546a34713a243d5048796ddf6013122f3cb4a47d5e1e66bded2b9867Yes. Di local Python → PDF → Windows printing flow go work offline after you prepare all dependencies, browser and any Ollama model. E no use cloud renderer. Initial setup fit need downloads; di separate MCP bridge dey use its own configured API endpoint.
No. Dis page dey provide downloads and code examples. Printing dey run through di installed local SDK. Every prepared job need fresh confirmation wey you go see for di Windows window.
Di current print module support Windows 10/11 with desktop session and installed printer. E dey print single-sided A4 and fit di content to di printable area. Dis release no include physical printing for macOS or Linux.
Na developer preview wey require human confirmation. Test your own printer, documents, fonts and local data handling. Automated tests and native read-only checks no replace a physical print test wey you approve for your hardware.
Start with di local PDF sample, then connect your model and printer.