MCPcopy
hub / github.com/simstudioai/sim / createPdfFallbackMessage

Function createPdfFallbackMessage

apps/sim/app/api/files/parse/route.ts:1142–1150  ·  view source on GitHub ↗

* Create a formatted message for PDF content

(pageCount: number, size: number, path?: string)

Source from the content-addressed store, hash-verified

1140 * Create a formatted message for PDF content
1141 */
1142function createPdfFallbackMessage(pageCount: number, size: number, path?: string): string {
1143 const formattedPath = path || 'Unknown path'
1144
1145 return `PDF document - ${pageCount} page(s), ${prettySize(size)}
1146Path: ${formattedPath}
1147
1148This file appears to be a PDF document that could not be fully processed as text.
1149Please use a PDF viewer for best results.`
1150}
1151
1152/**
1153 * Create error message for PDF parsing failure and make it more readable

Callers 1

handlePdfBufferFunction · 0.85

Calls 1

prettySizeFunction · 0.85

Tested by

no test coverage detected