Skip to content

This Node.js application allows for the conversion of TIFF images to PDF format and subsequently merges multiple PDF documents into a single PDF file.

License

Notifications You must be signed in to change notification settings

naturuplift/ConvertTIFFtoPDF

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

TIFF to PDF Converter and Merger


Inquirer GitHub (for repository hosting and project management) - Provides hosting for software development and version control using Git Git (for version control) - A free and open-source distributed version control system Node.js


This Node.js application allows for the conversion of TIFF images to PDF format and subsequently merges multiple PDF documents into a single PDF file. It's designed to streamline the process of handling TIFF files and preparing them for easy distribution or archiving in the PDF format.

Table of Contents

Prerequisites

Before you begin, ensure you have the following installed on your system:

Node.js (version 12.x or later recommended) npm (usually comes with Node.js)

Installation

To set up the application on your local machine, follow these steps:

  1. Clone the repository to your local machine:
  git clone https://github.com/naturuplift/ConvertTIFFtoPDF
  cd your-repository-directory
  1. Install the necessary Node.js packages:
  npm install

This command installs all dependencies defined in package.json, including pdf-lib and sharp for PDF manipulation and image processing.

Usage

To convert TIFF files to PDF and merge them into a single document, follow these steps:

  1. Place your TIFF files in the assets directory. Ensure they are named sequentially (e.g., "File 1.tif", "File 2.tif", etc.).

  2. Run the application:

  node app.js

Replace app.js with the actual entry point of your application if different.

  1. The application will convert each TIFF file to a PDF, then merge all resulting PDFs into a single file named merged.pdf in the assets directory.

image

Customizing File Paths

To customize the input or output file paths, edit the convertTiffToPdf function in your script, modifying the tiffPath and pdfPath variables as needed.

Libraries Used

  • pdf-lib: For creating and manipulating PDF files.
  • sharp: For converting TIFF images to a format suitable for embedding in PDFs.

Contributing

Contributions to the project are welcome: Fork the project. Create your feature branch (git checkout -b feature/AmazingFeature). Commit your changes (git commit -m 'Add some AmazingFeature'). Push to the branch (git push origin feature/AmazingFeature). Open a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

This Node.js application allows for the conversion of TIFF images to PDF format and subsequently merges multiple PDF documents into a single PDF file.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published