Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [pdf]

Portable Document Format (PDF) is an open standard for electronic document exchange maintained by the International Organization for Standardization (ISO). Questions can be about creating, reading, editing PDFs using different languages.

3
votes
0answers
38 views

Download and analyze PDFs of Congressional records

This is built with Python 2.7.15. The goal of this script is to count the number of words spoken by each Senator on the floor of Congress between given dates. It pulls from the Congressional Record, ...
4
votes
0answers
71 views

Writing PDF files in C#

I have been making C# software to write PDF files. It's intended to be simple to use, compact, efficient and also reasonably simple to understand, maintain and extend as required. The basic ...
6
votes
3answers
107 views

Improved RFC 1951 Deflate compression

I have substantially revised my earlier implementation, it now seems to be competitive with the standard C# ZLib implementation, increasing compression while being faster for moderate length inputs, ...
0
votes
0answers
27 views

Class to create and send a PDF form with attached documents

I'm currently working on building a class to create a PDF form application with attached documents and sending that file to an endpoint in Box Api. I have found extremely difficult managing ...
3
votes
0answers
75 views

A Python script to plot data and save to PDF

I have a very simple Python script. All it does is open two data files from a given directory, read the data, make a series of plots and save as PDF. It works, but it is very slow. It takes almost 20 ...
6
votes
1answer
888 views

Open encrypted PDF file by trying passwords from a word list

As an exercise, I wrote a program to decrypt a PDF file. The only thing that is known about the encryption password is that it is a single English word (all capital or lowercase). The program uses a ...
4
votes
1answer
137 views

Decrypting PDF-Files

In Encrypt PDF-Files I provided a Python program to encrypt PDF-Files in a folder. This program here does the oposite. Giving a password and path all PDFs which are encrypted are decrypted in the ...
8
votes
2answers
111 views

Encrypt PDF-Files

I wrote the following program for encrypting PDF Files for checking out the PyPDF2 module. It takes a path and a password via the command line or user input. Then all PDF files in the provided folder ...
5
votes
0answers
34 views

CMYK shadings implementation for PGF

PGF is a graphics framework for \$\TeX\$ and friends. It supports shadings (gradients), but only in RGB. There is often a need to output shadings in CMYK and I am having a go at implementing this. I'...
1
vote
1answer
49 views

Text extraction of document files

I have this script that pulls text out of .docx, .doc and .pdf files and uploads that text to an Azure SQL Server. This is so users can search on the contents of those documents without using Windows ...
6
votes
1answer
98 views

Two versions of PDF-Selector

I have basically ended up with 2 versions of a PDF-Selector. Both versions do the same thing. I'm not sure which solution is better. Maybe someone could give me a code review. I use: PDFSharp-Nuget-...
0
votes
2answers
250 views

VB.NET - Error Handling in Generic Class for PDF Merge

As a part of a project I'm working on, a new requirement has arisen for me to be able to generate multiple PDF files and then merge them together before they are delivered to our client(s). For this, ...
3
votes
1answer
118 views

Retrieve TOC from PDF

I am reading 'Python Trick' in PDF type. To have a big picture of the book, I aim to get a structure dict of TOC from the book. So I copied its TOC from PDF to typora(a markdown editor) and solve the ...
2
votes
2answers
523 views

Extract images from a PDF or ZIP file

Input inputBlob - A PDF or ZIP file containing all the pages of many students' test papers. extension - The file type ("pdf" or ...
2
votes
1answer
180 views

Bash - script to encrypt pdf files using pdfencrypt

I wrote a small script to get around the issue when using pdfencrypt on the command line the password is always echoed as well as being saved to the 'history'. <...
1
vote
2answers
121 views

Exporting Matlab Figures as PDF with a Minimal Amount of Whitespace for use in LaTeX

About this code This Matlab function takes in the handle of a figure and exports a PDF containing a vector image of the plot. The caller of this function can opt to even remove the axes if he or ...
4
votes
1answer
281 views

Small program to download wikipedia articles to pdf

I made a small app to download wikipedia articles (and optionally those that it links to) as PDFs to take on the go. I'd eventually like to do a text-to-speech option and save the article as an mp3, ...
2
votes
1answer
188 views

Batch convert images to PDF

I wrote a simple program that converts graphic files in a folder to a single PDF using Magic.NET. It works fine. I'm interested in general comments about the code ...
6
votes
1answer
141 views

Makefile for building classwork from markdown files and LaTeX

The following makefile builds my classwork for my various college classes and builds pdfs to hold the notes I took during class. I would like feedback on my directory structure and any optimizations ...
3
votes
2answers
227 views

Changing PDF annotation with JavaScript code to jump to page into regular to Go To Page action

I have just written my first program in C#. Please explain: Have I used any bad practices? How could the code be improved? I would appreciate if provide the ...
5
votes
2answers
965 views

Classifying image by file extension within a PDF creator

To create a pdfDocument I am using following code which works as expected but do not want to use multiple if else. Any patterns or any design strategies? It may ...
6
votes
2answers
515 views

Implementing a PDF generator that converts classes into PDFs

I'm building a tool that takes in web requests and deserializes JSON requests into a C# class. Each page calls a different controller URL that is looking for a specific request. Once the request is ...
6
votes
1answer
99 views

Get bibtex entries from metadata of PDF files

When I have to write a report or an article, I usually have my bibliography as PDFs in a specific folder, so I wrote this script to automate the generation of bibtex entries. It works so far, but I'd ...
2
votes
0answers
773 views

Using iTextSharp and AddDocument/FreeReader to create a PDF document in streaming fashion

I have a directory of PDF files I want to merge into a single PDF. The number of files in the directory could be 10s, 100s, or even 1000s, so I'm trying to make sure my process is streaming as much ...
2
votes
0answers
2k views

Download a PDF and submit it as a print job

I have following Java code, which is to print PDF, but in a busy location this code is taking about 20 to 30 second delay before submitting to the hardware. get the PDF file via the network download ...
1
vote
1answer
65 views

PDF merging implementation

How can this be improved? ...
5
votes
1answer
169 views

MySQL/CUPS PDF printer for STAR TSP100 ECO

This is my very first attempt at Python and whilst the script works perfectly, I'd like to see if I'm missing anything obvious or doing anything particularly stupid. I think this runs on Python 2.7, ...
3
votes
1answer
157 views

Split big PDF into smaller documents and insert text at specific position

I’m new to Java programming and uncertain if I used the right approach to solve my job. This little program uses the iText library to split one big PDF into smaller documents. The trigger for this is ...
4
votes
2answers
3k views

Extract Pages from PDF based on search in python

Everything is working fine except timing. it takes lot time for my file containing 1000 pages and having 100 pages of interest. ...
1
vote
0answers
273 views

POJO-based PDF form filler

I'm pretty new to Java development and have written a little POJO to "PDF Form Filler" program. I'd be interested in recommendations and suggestions about coding style, used methods and classes and so ...
2
votes
1answer
282 views

PDF conversion and timestamp tool

Since the last post, I have ported it to WPF (semi-MVVM) and added support for Excel and PowerPoint files, and custom fields and scripts. The conversion is done by interop with office. Apparently ...
4
votes
1answer
621 views

pdftk replacement

I am working on a replacement for a program called pdftk. The program needs to be able to take pdf's, and generate fdf files for them, fill a pdf from an fdf, output info about the forms, and output ...
5
votes
1answer
2k views

PDF processing by PDFBox app jar

I want to convert a large PDF file into individual text files with PDFBox using Python. This code takes lot of time to convert a PDF containing 1000 pages. Is there anything I can do to improve it? ...
4
votes
1answer
130 views

PDF conversion and time stamp tool

This is the latest edition of my PDF tool, previously mentioned here, here, here, and inspired by my first attempt at a MVP here. Major differences from previous editions: It uses the MVP pattern (...
5
votes
3answers
507 views

PDF script tool to convert documents to PDF and add fields and scripts

This is an update from here. This tool is a Windows Form application that can add fields and scripts to PDF files, as well as convert Microsoft Office Word documents to PDF. The usage is as follows: ...
3
votes
1answer
824 views

Add Field To PDF with Options for Multiple Pages

This is related to here and here. These two methods are used to programatically add a text field to a PDF document. The field can be of any user determined size and have any user determined title, and ...
1
vote
2answers
4k views

PDF Stamper Method to Add Field and Script to PDF File

This is related to my (unanswered) question here, but the code has changed considerably since I asked that question. I have a method that takes the filename of a PDF file and a Script object, and ...
5
votes
1answer
256 views

PDF Script Tool - adds JavaScripts to PDF files

This is a Windows Forms application that adds JavaScripts to PDF files. It supports multiple files at the same time. Right now, the only supported script is a "time-stamp on print" script, but any ...
8
votes
1answer
200 views

LaTeX code for presentation slides

I'm giving a presentation in a few days. I'm preparing my material in LaTeX; however, I am relatively new to it. How can I make my LaTeX code more concise and less repetitive? Here is a reduced ...
4
votes
1answer
1k views

Merging SharePoint Word documents into a single PDF with iTextSharp

I created a program which collects all the word files from a folder which belongs to our SharePoint library of documents. The program will only grab the documents if they were submitted/are a part of ...
5
votes
1answer
107 views

ExcelVBA loop exports data from spreadsheet to table within Excel

I want to nest a for loop to cycle through the Range.Value but ("B4") throws me off and this can't be avoided. I was considering using an array to do this but can'...
6
votes
1answer
217 views

Dealing with a command line argument (path) with spaces

I created a key in Windows registry to have an option on every folder which allows me to simply right click, choose the right option and have a PDF made, either from JPGS, or PNGs, or TIFs. My ...
3
votes
2answers
3k views

Python code to encrypt and email PDF file using PyPDF2

This is my first programming project with real world application. It's purpose is to take a file from a directory, encrypt it with a predetermined password, and email to appropriate recipient. ID ...
3
votes
2answers
506 views

Stamp PDF file with name and company

I wrote some code to put stamps on all pages of a PDF file with the name and company passed as parameters. It works as intended, but as I am a beginner in Java, I am sure there are some best practices ...
10
votes
1answer
856 views

Read and replace URL from PDF file

This is a code I wrote to find all URL within a PDF file and replace the one that matches the ID that I passed as a parameter. It works as intended, but as I am a beginner on Java, I am sure there ...
4
votes
3answers
684 views

Converting Pandoc Markdown images from captioned to inline

After writing a rather long document in Markdown and using pandoc to convert it to a PDF, I found, to my dismay, that many of the images were out of place, and that they all had their alternate text ...
4
votes
1answer
4k views

Removing a header and footer from text output with PDFminer

I use PDFminer to extract text from a PDF, then I reopen the output file to remove an 8 line header and 8 line footer. Is there a more efficient way to remove the header/footer, either in place or ...
2
votes
0answers
1k views

PDF-to-JSON converter

I've created some methods to help me convert PDF to text and then text to a JSON object. I've never done this before and I'm using this exercise as a way to improve my knowledge of Ruby. The ...
5
votes
2answers
4k views

Finding matching PDF files in different folders and merging the two files into one

I have code which currently loops through one folder, finds two matching pdf-filenames and merges them into 1 pdf-file always in the same order. File 1 then File 2. My code is slow, maybe because ...
5
votes
3answers
6k views

Searching for a string in a downloaded PDF

This code goes to the website containing the PDF, downloads the PDF, then it converts this PDF to text. Finally, it reads this whole file (Over 5000 lines) into a list, line by line, and searches for ...