Sha256: b317f33090205d413fe95685e2f3014fdc9532f39e43100def776efc5b5885e6

Contents?: true

Size: 801 Bytes

Versions: 14

Compression:

Stored size: 801 Bytes

Contents

import java.io.*;
import org.xhtmlrenderer.pdf.ITextRenderer;
import com.lowagie.text.pdf.PdfReader;
import com.lowagie.text.pdf.PdfWriter;
import com.lowagie.text.pdf.PdfEncryptor;
public class encryptPdf
{
    public static void main(String[] args) throws Exception {
       
        String input = args[0];
        String output = args[1];
        String password = args[2];

        PdfReader pr = new PdfReader(input);
        OutputStream os = new FileOutputStream(output);
        PdfEncryptor.encrypt(pr,os, false,password,password, PdfWriter.AllowAssembly |
 PdfWriter.AllowCopy | PdfWriter.AllowDegradedPrinting | PdfWriter.AllowFillIn | PdfWriter.AllowModifyAnnotations | PdfWriter.AllowModifyContents  | PdfWriter.AllowPrinting | PdfWriter.AllowScreenReaders);
        os.close();
    }
}

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
acts_as_flying_saucer-1.0.4 lib/acts_as_flying_saucer/java/src/encryptPdf.java
acts_as_flying_saucer-1.0.3 lib/acts_as_flying_saucer/java/src/encryptPdf.java
acts_as_flying_saucer-1.0.2 lib/acts_as_flying_saucer/java/src/encryptPdf.java
acts_as_flying_saucer-1.0.1 lib/acts_as_flying_saucer/java/src/encryptPdf.java
acts_as_flying_saucer-1.0.0 lib/acts_as_flying_saucer/java/src/encryptPdf.java
acts_as_flying_saucer-0.0.9 lib/acts_as_flying_saucer/java/src/encryptPdf.java
acts_as_flying_saucer-0.0.8 lib/acts_as_flying_saucer/java/src/encryptPdf.java
acts_as_flying_saucer-0.0.7 lib/acts_as_flying_saucer/java/src/encryptPdf.java
acts_as_flying_saucer-0.0.6 lib/acts_as_flying_saucer/java/src/encryptPdf.java
acts_as_flying_saucer-0.0.5 lib/acts_as_flying_saucer/java/src/encryptPdf.java
acts_as_flying_saucer-0.0.4 lib/acts_as_flying_saucer/java/src/encryptPdf.java
acts_as_flying_saucer-0.0.3 lib/acts_as_flying_saucer/java/src/encryptPdf.java
acts_as_flying_saucer-0.0.2 lib/acts_as_flying_saucer/java/src/encryptPdf.java
acts_as_flying_saucer-0.0.1 lib/acts_as_flying_saucer/java/src/encryptPdf.java