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

{
  "context": "This evaluation assesses how effectively the engineer uses pdf2pic's buffer output format capability to convert PDF pages to in-memory image buffers. The focus is on proper usage of the responseType parameter, correct initialization methods, and proper handling of the returned buffer response structure.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Uses fromPath method",
      "description": "Correctly imports and uses the fromPath method from pdf2pic to initialize the converter with a file path",
      "max_score": 15
    },
    {
      "name": "Specifies buffer responseType",
      "description": "Correctly passes responseType: 'buffer' option to the convert method to request buffer output format",
      "max_score": 30
    },
    {
      "name": "Handles BufferResponse structure",
      "description": "Properly extracts and returns the buffer, size, and page properties from the conversion result object",
      "max_score": 25
    },
    {
      "name": "Calls convert method",
      "description": "Correctly invokes the convert method with the page number parameter to perform single page conversion",
      "max_score": 20
    },
    {
      "name": "Async/Promise handling",
      "description": "Properly uses await or .then() to handle the promise returned by the convert method",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-pdf2pic

tile.json