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