feat: add md<->pdf document converters
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -48,6 +48,16 @@ describe('PDF source document converters', () => {
|
||||
expect(html).toContain('<p>');
|
||||
});
|
||||
|
||||
it('extracts text from PDF to MD', async () => {
|
||||
const outputPath = path.join(tmpDir, 'output.md');
|
||||
const entry = resolve('pdf', 'md');
|
||||
|
||||
await entry.convert(pdfFixturePath, outputPath);
|
||||
|
||||
const markdown = await fs.readFile(outputPath, 'utf8');
|
||||
expect(markdown).toContain('Extractable fixture text');
|
||||
});
|
||||
|
||||
it('reconstructs PDF text into a DOCX (best-effort)', async () => {
|
||||
const outputPath = path.join(tmpDir, 'output.docx');
|
||||
const entry = resolve('pdf', 'docx');
|
||||
|
||||
Reference in New Issue
Block a user