or run

npx @tessl/cli init
Log in

Version

Files

tile.json

task.mdevals/scenario-10/

PDF Print Quality Converter

A command-line utility that converts PDF documents to high-resolution images suitable for professional printing.

Requirements

Create a tool that converts PDF files to print-ready image files with professional quality settings. The tool should:

  1. Accept a PDF file path and an output directory as command-line arguments
  2. Convert the first page of the PDF to a high-resolution PNG image suitable for printing
  3. Use professional print quality settings (300 DPI or higher)
  4. Save the output image to the specified directory with the name print-ready.png
  5. Display the output file path upon successful conversion

Input Format

The tool should accept two command-line arguments:

  • First argument: path to the input PDF file
  • Second argument: path to the output directory (must exist)

Example usage:

node convert.js document.pdf ./output

Output Requirements

  • File format: PNG
  • Resolution: 300 DPI or higher
  • File naming: print-ready.png
  • Location: The specified output directory

The program should print the full path to the created file after successful conversion.

Test Cases

  • Given a PDF file at test-input.pdf and output directory ./test-output, the tool creates a high-resolution image at ./test-output/print-ready.png with 300 DPI resolution @test

  • Given a PDF file at sample.pdf and output directory ./images, the tool creates a high-resolution image at ./images/print-ready.png with at least 300 DPI resolution @test

Implementation

@generates

Dependencies { .dependencies }

pdf2pic { .dependency }

Provides PDF to image conversion capabilities.

@satisfied-by