This commit is contained in:
@@ -18,9 +18,7 @@
|
|||||||
let { profile, experience, education, skills, ownProjects, contributions }: Props = $props();
|
let { profile, experience, education, skills, ownProjects, contributions }: Props = $props();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div
|
<div class="font-sans max-w-[210mm] mx-auto bg-pdf-bg text-pdf-fg leading-relaxed text-sm">
|
||||||
class="font-sans max-w-[210mm] mx-auto px-[20mm] py-[18mm] bg-pdf-bg text-pdf-fg leading-relaxed text-sm"
|
|
||||||
>
|
|
||||||
<!-- Header -->
|
<!-- Header -->
|
||||||
<header class="mb-6 pb-4 border-b-2 border-pdf-fg">
|
<header class="mb-6 pb-4 border-b-2 border-pdf-fg">
|
||||||
<div class="flex items-start justify-between gap-4">
|
<div class="flex items-start justify-between gap-4">
|
||||||
|
|||||||
@@ -9,6 +9,5 @@
|
|||||||
<style>
|
<style>
|
||||||
@page {
|
@page {
|
||||||
size: A4;
|
size: A4;
|
||||||
margin: 15mm;
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import type { RequestHandler } from './$types.js';
|
import type { RequestHandler } from './$types.js';
|
||||||
import type { LaunchOptions } from 'puppeteer';
|
import type { LaunchOptions, PDFOptions } from 'puppeteer';
|
||||||
import { dev } from '$app/environment';
|
import { dev } from '$app/environment';
|
||||||
import puppeteer from 'puppeteer';
|
import puppeteer from 'puppeteer';
|
||||||
import * as cheerio from 'cheerio';
|
import * as cheerio from 'cheerio';
|
||||||
@@ -12,14 +12,14 @@ export const prerender = true;
|
|||||||
const cwd = process.cwd();
|
const cwd = process.cwd();
|
||||||
|
|
||||||
// PDF generation configuration
|
// PDF generation configuration
|
||||||
const PDF_CONFIG = {
|
const PDF_CONFIG: PDFOptions = {
|
||||||
format: 'A4' as const,
|
format: 'A4',
|
||||||
printBackground: true,
|
printBackground: true,
|
||||||
preferCSSPageSize: true,
|
preferCSSPageSize: true,
|
||||||
margin: {
|
margin: {
|
||||||
top: '20mm',
|
top: '15mm',
|
||||||
right: '20mm',
|
right: '20mm',
|
||||||
bottom: '20mm',
|
bottom: '15mm',
|
||||||
left: '20mm',
|
left: '20mm',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user