Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/CristianParadaLopez/cv-builder/llms.txt

Use this file to discover all available pages before exploring further.

Once your CV has been generated, Skillara AI lets you export it as a print-ready A4 PDF by clicking Descargar PDF in the Builder’s result view. The export runs entirely in your browser using html2canvas and jsPDF — no server round-trip required.

Client-side export (default)

The client-side export is triggered by clicking the Descargar PDF button in the Builder’s result view. The handleDownload function in Builder.tsx orchestrates the following pipeline:
1

Parse the CV HTML

The generated HTML string is parsed with new DOMParser() to extract the <style> blocks and body content separately.
2

Mount an off-screen render container

A hidden <div> is appended to document.body with the following fixed dimensions and styles:
position: absolute;
left: -9999px;
top: 0;
width: 794px;
min-height: 1123px;
background: #ffffff;
The parsed <style> elements and body HTML are injected into this container so the CV renders at exact A4 pixel dimensions (794×1123px at 96 dpi).
3

Wait for fonts and styles to load

A 1500ms delay lets the browser fully apply all CSS, load any web fonts, and paint background colors before the screenshot is taken.
4

Capture with html2canvas

html2canvas renders the container to a <canvas> element at scale: 2 (double resolution for crisp output):
const canvas = await html2canvas(container, {
  scale: 2,
  useCORS: true,
  allowTaint: true,
  backgroundColor: "#ffffff",
  logging: false,
  width: 794,
  windowWidth: 794,
});
5

Embed in a jsPDF document

The canvas is converted to a PNG data URL and added to a jsPDF document in A4 portrait format ("p", "mm", "a4"). The image is scaled to fit the page width exactly.Multi-page handling: if the content height exceeds a single A4 page, the export loop adds new pages and repositions the image until all content is covered:
while (heightLeft > 0) {
  position = heightLeft - scaledHeight;
  pdf.addPage();
  pdf.addImage(imgData, "PNG", 0, position, scaledWidth, scaledHeight);
  heightLeft -= pdfHeight;
}
6

Save the file

The completed PDF document is saved to the user’s device as mi-cv-skillara.pdf.
Fallback: If html2canvas throws an error (for example, due to CORS restrictions on an external image), the Builder opens the raw CV HTML in a new browser tab and calls window.print() after an 800ms delay. This gives you a browser print dialog as a last resort.

Server-side export (not yet available)

The backend controller (cv.controller.ts) includes a handleDownloadPDF function that uses a headless Chromium browser via Playwright to generate PDFs server-side. This approach produces more faithful output for templates with CSS gradients and custom backgrounds, because Playwright’s printBackground: true option captures these elements reliably.
handleDownloadPDF is implemented in the controller but is not currently registered in any backend route. There is no active POST /api/cv/pdf endpoint. Until the route is wired up, the server-side path is not accessible from the application or via direct API calls.
When the server-side route is eventually exposed, the handler will accept:
{
  "html": "<!DOCTYPE html><html>...</html>"
}
It will launch a headless Chromium instance, load the HTML, wait for rendering to complete, then generate the PDF with the following Playwright options:
{
  format: "A4",
  printBackground: true,
  margin: { top: "0", right: "0", bottom: "0", left: "0" },
  preferCSSPageSize: true
}
printBackground: true ensures that sidebar colors, gradients, and background images are included. preferCSSPageSize: true respects the @page { size: A4 portrait; } rule embedded in the CV’s stylesheet. The response will return a binary PDF with Content-Type: application/pdf and Content-Disposition: attachment; filename="mi-cv-skillara.pdf".

Tips for the best PDF output

Moderno and Clásico

Both templates render reliably with the client-side export. The html2canvas renderer handles their flat-color sidebars and two-column layouts correctly.

Creativo

The green gradient sidebar (linear-gradient(180deg, #2d9c7e, #1f7a60)) may appear as a flat color in some browser-side html2canvas versions. If your gradient is missing, try using the browser’s built-in print dialog (Ctrl+P / Cmd+P) as an alternative until the server-side Playwright route is available.

Minimalista

Single-column, no backgrounds, no gradients — the simplest case for export. The client-side method produces clean, correctly formatted output.

ATS mode

Plain black-and-white single-column HTML. The client-side export produces a clean, correctly formatted PDF with no rendering edge cases.
Every CV generated by Skillara AI includes the following CSS block at the end of its <style> tag, which enforces zero-margin and exact-color printing regardless of browser print settings:
@media print {
  body { margin: 0 !important; }
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  @page { margin: 0; size: A4 portrait; }
}
This rule is appended automatically by the AI to every generated CV and ensures that both the client-side export and direct browser printing produce consistent A4 output.

Build docs developers (and LLMs) love