web2print-service/test-css-custom.md
2025-11-28 15:38:02 +01:00

724 B

Test du CSS custom

curl -X POST http://web2print.studio-variable.com/generate -H "Content-Type: application/json" -H "X-API-Key: 25377ab6e2153b159d1d5fa22501228810b6aec9d63346bd0614045dc167061c" -d '{"html":"<!DOCTYPE html><html><head><meta charset=\"utf-8\"><style>@page { size: A4; margin: 2cm; } body { font-family: Arial; }</style></head><body><h1>Test CSS Custom</h1><p class=\"custom\">Ce texte devrait être rouge et en gras.</p></body></html>","css":"h1 { color: blue; } .custom { color: red; font-weight: bold; font-size: 20px; }"}' --output test-css-custom.pdf

Le PDF généré devrait avoir :

  • Le h1 en bleu (CSS custom)
  • Le paragraphe avec classe "custom" en rouge et gras (CSS custom)