Posts

Showing posts with the label PDF

Blogger posts and PDFs that can be embedded, scrolled through, and downloaded

Image
Table of Contents 1. Blogger and Embedded PDFs 2. Summary of Steps 2.1. Step 1: Upload the PDF to Google Drive 2.2. Step 2: Modify the URL for the preview 2.3. Step 3: Insert the PDF into Blogger 3. Downloading the document 4. A Little Gift 1. Blogger and Embedded PDFs Is it possible to embed PDF documents in posts published on Blogger without using additional applications? Perhaps with the ability to scroll through the embedded documents and download them locally? Absolutely, and the solution is very simple. Here is a summary of the steps with some additional notes: 2. Summary of Steps 2.1. Step 1: Upload the PDF to Google Drive Go to Google Drive and sign in with your Google account. Upload the PDF document, right-click on the file → Share → set the visibility with something like “Anyone with the link can view.” Click Copy link. 2.2. Step 2: Modify the URL for the preview Replace view?usp=sharing at the end of the link with pre...

Two open source tools for editing PDF documents: GUI versus CLI.

Image
Table of Contents 1. Introduction 2. Managing operations with PDF Arranger 3. Managing the same operations with PDFtk. 4. In summary 1. Introduction The “PDF” is the essentially static document format par excellence. However, even PDF documents can be modified, especially with operations such as deleting, adding, reversing pages, inserting text, and more. There are various applications, including free ones, for performing these operations. In this article, I will report some parallel observations between two systems for page manipulation: one graphical, PDF Arranger, and one command line, PDFtk. PDF Arranger is a free and open source application (a fork of PDF-Shuffler) ideal for merging, splitting, rotating, and cropping PDF files in an intuitive way. PDFtk is one of the most powerful tools for manipulating PDFs in command line mode. I would like to point out that this article does not claim to be exhaustive on the two systems mentioned, but is onl...

A Python program to copy text from various PDFs and collect it into a single document in Markdown language.

Image
1. Subject of this article. 2. Python source analysis. 3. The full source code in Python. 1. Subject of this article. The goal is to generate a simple program to collect the text contained in various PDFs generated directly from word processing programs and insert the various fragments into a single document in Markdown language by separating the fragments with second-level headings corresponding to the name of the source documents. The "hands-on" solution is to copy the text from the individual documents, one by one, and paste it into a second document. Or you could build a simple application in Python that does all the work automatically, saving an amount of time directly proportional to the number of documents to be processed. The script , generated with the help of Copilot ( because I am not a programmer), requires the installation of the PyPDF2 library. Warning: this article does NOT discuss optical character recognition (OCR). For that topic, yo...

Reducing the size of single or multiple PDF documents in GNU/Linux Bash and Python

Image
Abstract : Compression of PDF documents is a useful technique to reduce the space occupied by these files and facilitate their transmission and storage. In this article, starting from a page devoted to compressing single PDFs, I present two methods for compressing multiple PDF documents. The reference page is as follows: " Linux shell script to reduce PDF file size (simple verification required to enter) and allows you to operate on single PDFs in command-line bash code in the GNU/Linux terminal. Based on the previous one, I tried to extend the procedure to operate on multiple PDFs. In the end I present a simple application in Python with graphical interface. I admit that I asked for some help from ChatGPT and Copilot. Table of Contents: 1. The necessary condition. 2. The reference script for size reduction of individual PDFs 2.1. Script analysis and usage. 3. Derived script to operate on multiple PDFs. ...

About LaTeX, standalone, PDF and PNG

Image
1 LaTeX and the document format 2 Exporting documents from PDF to PNG. 3 Exporting images from PDF to PNG. 4 Examples 1 LaTeX and the document format As, of course, you all already know (:smiley:), LaTeX is a language dedicated to the typesetting of documents with state-of-the-art quality. It is, therefore, unnecessary to note that the basics of LaTeX can be learned in about 30 minutes, as illustrated in this page . For the purposes of this article, it is sufficient to recall that sources in LaTeX are composed of a preliminary part, also called the preamble , and the document with the contents. The format of documents generated by LaTeX is defined at the beginning of the preamble with the command \documentclass . The (probably) most widely used classes, such as article , report and book , produce documents in formats with predetermined sizes, specified by specific options, such as A4 (...

Text documents: from PDF to vector images

Image
Subject of this article Recently I needed to convert some documents from PDF format, containing text generated by LaTeX in GNU/Linux operating systems, into vector images. While avoiding conversion from online services, I basically found three interesting solutions: two in command-line mode ( pdf2svg and pdftocairo ) and one, very famous, in graphical mode ( Inkscape ). In this article I report my evaluations highlighting some differences deriving from the source of the PDF documents and the behaviour of three Linux distributions. Some interesting references on the subject: - Exporting .png or .jpg files directly from LaTeX code. Possible? - LaTeX/Export To Other Formats pdf2svg It’s a command line software, very easy to use, reliable and fast. The followin is the command scheme: pdf2svg < in file.pdf > < out file.svg > [ < page no > ] You can specify the number of pages to be exported. Ideal for quick and direct o...

LaTeX inverse search with SumatraPDF

Image
In this article I will explain how the inverse search (or inverse synchronisation if you prefer) may work, in a Windows operating system, between a source document in LaTeX, written via a command line editor, and a PDF reader.