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-8/

{
  "context": "This evaluation assesses how well the engineer uses the pdf2pic package to implement bulk PDF conversion, specifically focusing on the usage of the bulk conversion API with automatic page detection to convert all pages of a PDF document.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Uses bulk method",
      "description": "Uses the bulk() method from pdf2pic's Convert object instead of manually iterating and calling convert() for individual pages",
      "max_score": 30
    },
    {
      "name": "Uses -1 parameter",
      "description": "Passes -1 as the pages parameter to bulk() to automatically detect and convert all pages without needing to know the page count in advance",
      "max_score": 30
    },
    {
      "name": "Proper initialization",
      "description": "Correctly initializes pdf2pic using one of the input methods (fromPath, fromBuffer, or fromBase64) with appropriate configuration options",
      "max_score": 20
    },
    {
      "name": "Configuration options",
      "description": "Properly passes configuration options (format, savePath, saveFilename) to either the initialization or bulk() call to control output behavior",
      "max_score": 15
    },
    {
      "name": "Promise handling",
      "description": "Correctly handles the Promise returned by bulk() using async/await or .then() to get the array of conversion results",
      "max_score": 5
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-pdf2pic

tile.json