A utility for converting pdf to image formats with support for different outputs: directly to file, base64 or buffer.
Overall
score
97%
{
"context": "This criteria evaluates the engineer's ability to use pdf2pic's format option to convert PDFs to different image formats. The focus is on understanding how to configure and use the format parameter correctly for multiple output formats.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Uses pdf2pic import",
"description": "Code imports pdf2pic using fromPath, fromBuffer, or fromBase64 function",
"max_score": 15
},
{
"name": "PNG format conversion",
"description": "Successfully converts PDF to PNG format by specifying format: 'png' in the options object",
"max_score": 25
},
{
"name": "JPEG format conversion",
"description": "Successfully converts PDF to JPEG format by specifying format: 'jpeg' or format: 'jpg' in the options object",
"max_score": 25
},
{
"name": "WebP format conversion",
"description": "Successfully converts PDF to WebP format by specifying format: 'webp' in the options object",
"max_score": 25
},
{
"name": "Output directory configuration",
"description": "Uses savePath option to specify the output directory for saving converted images",
"max_score": 10
}
]
}Install with Tessl CLI
npx tessl i tessl/npm-pdf2picevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10