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

{
  "context": "This criteria evaluates how well the engineer uses the pdf2pic package's promise-based async operations to convert multiple PDF pages concurrently. The focus is on proper usage of async/await patterns, Promise.all for concurrent operations, and appropriate error handling within the promise chain.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Uses fromPath function",
      "description": "Correctly imports and uses pdf2pic's fromPath function to initialize the converter with the PDF file path",
      "max_score": 15
    },
    {
      "name": "Promise-based conversion",
      "description": "Uses the convert() method which returns a Promise for each page conversion operation",
      "max_score": 20
    },
    {
      "name": "Concurrent processing",
      "description": "Uses Promise.all() or similar concurrent pattern to process multiple pages in parallel rather than sequentially",
      "max_score": 25
    },
    {
      "name": "Async function signature",
      "description": "The convertPages function is declared as async or explicitly returns a Promise",
      "max_score": 10
    },
    {
      "name": "Error handling",
      "description": "Uses try-catch blocks or .catch() handlers to properly handle promise rejections for individual page conversions",
      "max_score": 20
    },
    {
      "name": "Configuration options",
      "description": "Passes the options object (format, savePath, saveFilename) correctly to the fromPath function",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-pdf2pic

tile.json