CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-pdf2pic

A utility for converting pdf to image formats with support for different outputs: directly to file, base64 or buffer.

Overall
score

97%

Overview
Eval results
Files

rubric.jsonevals/scenario-4/

{
  "context": "This criteria evaluates how effectively the engineer uses pdf2pic's quality control features, specifically the quality parameter and related configuration options to generate thumbnails with different quality levels and file sizes.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Uses fromPath function",
      "description": "Implementation correctly uses the fromPath function from pdf2pic to initialize the PDF converter with the input PDF path",
      "max_score": 15
    },
    {
      "name": "Configures quality parameter",
      "description": "Implementation correctly sets the quality option in the pdf2pic configuration object to control output image quality (values like 25, 50, 75, 95, 100)",
      "max_score": 25
    },
    {
      "name": "Sets format option",
      "description": "Implementation correctly uses the format option to specify output image format ('png' or 'jpg') based on the requirements",
      "max_score": 15
    },
    {
      "name": "Configures dimensions",
      "description": "Implementation correctly sets width and height options in the pdf2pic configuration to control thumbnail dimensions",
      "max_score": 10
    },
    {
      "name": "Configures output location",
      "description": "Implementation correctly uses savePath and saveFilename options to control where thumbnails are saved",
      "max_score": 10
    },
    {
      "name": "Calls convert method",
      "description": "Implementation correctly calls the convert method with page number 1 to convert the first page of the PDF",
      "max_score": 15
    },
    {
      "name": "Returns metadata",
      "description": "Implementation correctly returns or extracts metadata from the conversion result (path, size, fileSize) as required by the API",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-pdf2pic

tile.json