Skip to content

Instantly share code, notes, and snippets.

@JoelGeraci-Datalogics
JoelGeraci-Datalogics / MergeDocuments.java
Last active December 30, 2021 11:15
Merging PDF Files Using the Datalogics PDF Java Toolkit
/*
* Copyright Datalogics, Inc. 2015
*/
package pdfjt.cookbook.combine;
import com.adobe.internal.io.ByteReader;
import com.adobe.internal.io.ByteWriter;
import com.adobe.internal.io.InputStreamByteReader;
import com.adobe.pdfjt.core.types.ASRectangle;
import com.adobe.pdfjt.pdf.document.PDFCatalog;
@JoelGeraci-Datalogics
JoelGeraci-Datalogics / MergeFormsRetainingFields.java
Last active August 29, 2015 14:21
Merging PDF Files and Retaining Interactive Fields Using the Datalogics PDF Java Toolkit
/*
* Copyright Datalogics, Inc. 2015
*/
package pdfjt.cookbook.combine;
import com.adobe.internal.io.ByteReader;
import com.adobe.internal.io.ByteWriter;
import com.adobe.internal.io.InputStreamByteReader;
import com.adobe.pdfjt.core.types.ASRectangle;
@JoelGeraci-Datalogics
JoelGeraci-Datalogics / MergeFormsFlatteningFields.java
Created May 12, 2015 20:51
Merging PDF Files and Flattening Fields Using the Datalogics PDF Java Toolkit
/*
* Copyright Datalogics, Inc. 2015
*/
package pdfjt.cookbook.combine;
import com.adobe.internal.io.ByteReader;
import com.adobe.internal.io.ByteWriter;
import com.adobe.internal.io.InputStreamByteReader;
import com.adobe.pdfjt.core.types.ASRectangle;
@JoelGeraci-Datalogics
JoelGeraci-Datalogics / tiff2pdf.java
Last active September 13, 2015 07:33
Convert TIFF to PDF Using the Datalogics PDF Java Toolkit
/*
* Copyright Datalogics, Inc. 2015
*/
package pdfjt.cookbook.imaging;
import java.awt.image.BufferedImage;
import java.io.File;
import java.net.URL;
import java.util.Iterator;
@JoelGeraci-Datalogics
JoelGeraci-Datalogics / CreatePDFPortfolioFromZIP.java
Last active August 29, 2015 14:22
Creating PDF Portfolios from ZIP files using the Datalogics PDF Java Toolkit
package pdfjt.cookbook.combine;
/*
* ****************************************************************************
*
* Copyright 2009-2012 Adobe Systems Incorporated. All Rights Reserved.
* Portions Copyright 2012-2014 Datalogics Incorporated.
*
* NOTICE: Datalogics and Adobe permit you to use, modify, and distribute
* this file in accordance with the terms of the license agreement
* accompanying it. If you have received this file from a source other
@JoelGeraci-Datalogics
JoelGeraci-Datalogics / SignatureWithSeedValues.java
Last active August 29, 2015 14:23
Add Seed Values to PDF Digital Signatures
/*
* Copyright Datalogics, Inc. 2015
*/
package pdfjt.cookbook.signatures;
import com.adobe.internal.io.ByteReader;
import com.adobe.internal.io.ByteWriter;
import com.adobe.internal.io.InputStreamByteReader;
import com.adobe.pdfjt.core.types.ASName;
@JoelGeraci-Datalogics
JoelGeraci-Datalogics / ReplacePages.java
Last active August 29, 2015 14:24
This sample reproduces the Acrobat feature "Replace Pages". It will change the page content but leave the form fields in place.
/*
* Copyright Datalogics, Inc. 2015
*/
package pdfjt.cookbook.document;
import com.adobe.internal.io.ByteReader;
import com.adobe.internal.io.ByteWriter;
import com.adobe.internal.io.InputStreamByteReader;
import com.adobe.pdfjt.pdf.document.PDFDocument;
@JoelGeraci-Datalogics
JoelGeraci-Datalogics / StampedImage.java
Last active August 29, 2015 14:24
Add an Image to a PDF Page as a Stamp Annotation
/*
* Copyright Datalogics, Inc. 2015
*/
package pdfjt.cookbook.imaging;
import com.adobe.internal.io.ByteReader;
import com.adobe.internal.io.ByteWriter;
import com.adobe.internal.io.InputStreamByteReader;
import com.adobe.pdfjt.pdf.document.PDFDocument;
@JoelGeraci-Datalogics
JoelGeraci-Datalogics / UsingAcrobatStamps.java
Last active August 29, 2015 14:26
This sample will read a PDF file that contains Stamps looking for one with a specific name and then apply it to a PDF file in the same way that Acrobat does.
/*
* Copyright Datalogics, Inc. 2015
*/
package pdfjt.cookbook.stamps;
import com.adobe.internal.io.ByteReader;
import com.adobe.internal.io.ByteWriter;
import com.adobe.internal.io.InputStreamByteReader;
import com.adobe.pdfjt.pdf.document.PDFDocument;
@JoelGeraci-Datalogics
JoelGeraci-Datalogics / CreateSpreads.java
Created August 3, 2015 20:37
Create spreads from individual PDF pages
/*
* Copyright Datalogics, Inc. 2015
*/
package pdfjt.cookbook.document;
import com.adobe.internal.io.ByteReader;
import com.adobe.internal.io.ByteWriter;
import com.adobe.internal.io.InputStreamByteReader;
import com.adobe.pdfjt.core.types.ASCoordinate;