How can I make Org-mode export to LaTeX with a specific preamble?

When I do C-c C-e l to export an Org file to LaTeX it produces a document with a particular preamble. Instead of this particular preamble I would like it to use a preamble of my choice. Say that I...

pdftk and qpdf to reset PDF commenting security

to be able to add annotations to a pdf file in linux, i have to reset the "Commenting" security setting in the pdf document. qpdf --decrypt input.pdf output.pdf should remove any passwords or...

Repair apparently damaged pdf and reduce file size

I have a PDF file (4.6MB) which was made by combining 6 different PDFs (containing both text and bitmap graphics) using pdftk in Ubuntu 12.04. I wish to compress this file to something close to...

qpdf.exe for compactPDF?

I am trying to check a package that I have built (with vignette) using R CMD check --as-cran [my package] in my windows command prompt. All goes well until I get the message, WARNING 'qpdf' is...

Export PDF page labels on command line

I'd like to export the page-labels stored in some PDF documents for easy parsing. I know I could dig into the PDF document after having it converted with qpdf, but this seems like overkill. Is...

Remove encryption from PDF file using Apache PDFBox

With QPDF, you can simply remove restrictions / encryption from a PDF file like so: qpdf --decrypt infile outfile I would like to do the same thing with PDFBox in Java: PDDocument doc =...

How to convert a PDF to grayscale from command line avoiding to be rasterized?

I'm trying to convert to grayscale this PDF: https://dl.dropboxusercontent.com/u/10351891/page-27.pdf Ghostscript (v 9.10) with pdfwrite Device fails with a "Unable to convert color space to Gray,...

How to linearize pdf with ghostscript

How can I linearize (web-optimize) a random pdf with ghostscript (v9.18)? I know there is qpdf, but I want to explicitly use gs. Doing it with this command leads to a broken pdf which I am unable...

how to exract the text in pdf if encoding and ToUnicode both are present in pdf? how to map it?

here, i used qpdf tool to uncompress data and below is output. if you see there are encoding and ToUnicode both are present in pdf. i know if only ToUnicode is there so how to map individual char...

Is it possible to execute QPDF through Python script

I'm working on a python script that processes PDF files, though some of them contain encryption that restricts usage to only printing, which I have to manually remove before I can process...

How to build qpdf on Windows?

When running the checks for my R-package (via devtools::check()) I face the warning ''qpdf' is needed for checks on size reduction of PDFs. I found this question were it was suggested (if I...

R/ RStudio - system path issue

I think I did some damage to my system path and now I am unable to knit in RStudio. I have the most current version of R and RStudio. Here is what i'm working...

QT can't build - "Some of the required modules (!win32-g++) are not available"

I pulled down the qtpdf repository to check out and play with from here: http://code.qt.io/cgit/qt-labs/qtpdf.git As soon as I open the qtpdf.pro file, I get the following general messages: Cannot...

"PDF File has not been decrypted" issue still persists in PyPDF2

Getting the following errors while reading PDF files using PyPDF2 raise utils.PdfReadError("File has not been decrypted") PdfReadError: File has not been decrypted I have been trying to read...

linking qPDF in Qt

I need to fill pdf form. To do this I found and use qPDF c++ library. I added libqpdf.dll.a on fillPdf.pro using : win32:CONFIG(release, debug|release): LIBS += -L$$PWD/qpdf/lib/...

Can't apt-get install packages on pythonanywhere

I'm trying to deploy a django project to pythonanywhere. I'm using this package in my project: https://github.com/algoo/preview-generator In order for preview-generator to work it has the...

Unable to decrypt PDF in node using node-qpdf

We need to decrypt the password protected PDF file using node. We are using the node-qpdf. Here is our scenario. 1). We are getting the password protected PDF file as input. 2). using the QPDF ,...

Using Zsh and QPDF to decrypt multiple PDFs

From this answer https://stackoverflow.com/a/59688271/7577919 I was able to decrpypt multiple PDFs in place using this bash script: temp=`ls`; for each in $temp; do qpdf --decrypt --replace-input...

Can QPDF utility be used to extract attachments from a PDF file?

I have a PDF file with other PDF files attached to it. Acrobat shows them in "Attachments" tab and allows to open them in turn. QPDF documentations says something about extracting attachments but...

Encrypt pdf file using node-qpdf

I am trying to use node-qpdf I just did simple: Test.pdf is inside directory where index.js is var qpdf = require('node-qpdf'); var options = { keyLength: 128, password: 'test123', ...

Remove PDF metadata (removing complete PDF metadata )

I want to remove metadata from PDF files. I have already tried to use "exiftool", "pdftk" and "qpdf" to remove the metadata (method proposed - https://gist.github.com/hubgit/6078384 ). These tools...

gcc 9.3.0 preprocessor under Cygwin: cmdline -Dname but name seems to be undefined

I'm trying to build OCRmyPDF under Cygwin and have run into a brick wall. While I've been a developer my entire career, I've worked mostly in Java and have little knowledge of Python internals...

Installing mclust package problem. Installation is preparing for lazy loading and never finishes

After loading R 4.0.0 on Ubuntu 20.04. R version 4.0.0 (2020-04-24) -- "Arbor Day" Copyright (C) 2020 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free...

Split a PDF file into another two PDF files using qpdf

Is it possible to split a PDF file into two parts or n parts using qpdf tool? The docs say so but I couldn't find the exact command to do it. I'm using qpdf version 10.0.1.

Recursively(many subdirs) find pdf files and merge into one pdf file (linux, bash)

Surprisingly I have seen many help pages on how to do this, from the same directory. Those that are recursively used don't seem to work for me (the tries below), or require complications I don't...

PDF manipulation with Python

I need to remove the last page of a pdf file. I have multiple pdf files in the same directory. So far I have the next code: from PyPDF2 import PdfFileWriter, PdfFileReader import os def...

Restoring annotations from a PDF corrupted by Mac's Preview application from raw PDF text

Summary The 'Preview' Application for viewing and editing PDFs, native to MacOS has an annoyin bug which seems to exist since 'High Sierra' and is still not resolved in the current OS version...

How to decode PDF file and encode it back?

My overall goal is to make some PDF files conform to the PDF/A standard for archival purposes. They fail one requirement, namely that some glyph mappings map to 0, which they should not. My usual...

How to convert editable PDF to non-editable PDF in PHP/NodeJS?

Problem I would like to know is there any PHP/NodeJS API available to convert editable PDF to non-editable PDF online. We have a client application where we need a scenario where the user...

OCRmyPDF Error: Failed to fetch http://security.ubuntu.com/

I'm using Google Colab to run my Python codes. Today when I run !apt-get install ocrmypdf -q I get the following "Failed to fetch" error. Any idea why it's showing up and how to fix it?...