Gebruikssituaties
Gebruikssituaties
Gebruikssituaties
Documentarchief-pijplijn
Exporteer mappen met verouderde PostScript-rapporten naar PDF voor langdurige archivering:
from pathlib import Path
from aspose.page.ps.document import PsDocument
for ps_file in Path("reports").glob("*.ps"):
doc = PsDocument.from_file(str(ps_file))
out = Path("archive") / ps_file.with_suffix(".pdf").name
out.parent.mkdir(exist_ok=True)
out.write_bytes(doc.to_pdf())EPS Asset-rasterisatie
Rasteriseer EPS-illustraties naar PNG voor web of documentatie:
from pathlib import Path
from aspose.page.ps.document import PsDocument
from aspose.page.ps.output import ImageSaveOptions
for eps_file in Path("assets").glob("*.eps"):
doc = PsDocument.from_file(str(eps_file))
opts = ImageSaveOptions(format="png", dpi=150)
out = Path("web") / eps_file.with_suffix(".png").name
out.write_bytes(doc.to_image(opts))CI/CD Integratie
De bibliotheek draait zonder GUI in Docker-containers en CI-runners. Installeer deze eerst (zie de Installatiehandleiding voor de huidige installatiemethode), controleer vervolgens de import:
python -c "from aspose.page.ps.document import PsDocument; print('OK')"AI-agentpijplijn via MCP
Stel conversie beschikbaar als MCP-tools die aanroepbaar zijn vanuit Claude of andere MCP-compatibele agenten met behulp van de optionele MCP-server met FastMCP.