Giter VIP home page Giter VIP logo

pdf-extract-overview's Introduction

PDF-extract-Overview

Script to extract an "Overview" image for email attachments.

Project status: I can extract the Target page and crop it to the exact dimentions.

The Problem to solve:

When sending website reports to clients, as an added feature we embed an "Overview" image inside the email, the overview contains a breakdown of the updates, security status, number of backups, uptime of the website and other information.

When the feature was first added, I was cropping the .pdf file manually using Photoshop, uploading it to our website to generate a link, add that link to Trello and send the email, it was time consuming and inefficient.

The first step into making the process more efficient was, when uploading the new "Overview" image to not change the link, meaning for each client we use the same image, with the same url and we just change the image.

Another breakthrough was using Apple Shortcuts to crop the .pdf and save the image with a few clicks:

Apple Shortcut

Apple Shortcuts link

Currently, using the Apple shortcut has proved to be very efficient, but there is still a time loss with choosing which is the Target page, keeping the Original file and the output file, and uploading it myself to the website.

The "Why":

I want a program that will take as input the target .pdf file, and export the exact Overview image and upload it directly to the cloud, so a 1-click solution to the Problem.

The "How":

Using Python and PyPDF2 to extract the target .pdf page, pdf2image to convert the .pdf to .jpeg and find a way to upload it to the backend of my website.

Using the test.pdf, the main.py program should take the test.pdf file, go directly to page 4, crop it, convert it to .jpeg, ask "For which client is this Overview for?" and upload it.

The Cropped area, highlighted in red:

Crop Area

pdf-extract-overview's People

Contributors

gileanu avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.