Files
resume/utils/markdownToPdf.ts
Art Rosnovsky 12adecfeeb chore: add basic tests (#4)
* chore: add basic tests
* chore: address feedback
2024-02-05 19:55:58 -08:00

12 lines
285 B
TypeScript

import mdToPdf from 'md-to-pdf';
export const markdownToPdf = async (inputFilePath: string) => {
try {
const pdf = await mdToPdf({ path: inputFilePath });
return pdf;
} catch (error: any) {
console.error(`Error occurred: ${error.message}`);
throw error;
}
}