Skip to content

Instantly share code, notes, and snippets.

@JoelGeraci-Datalogics
JoelGeraci-Datalogics / ConvertPDFToSWF.java
Last active August 29, 2015 14:28
This Gist will convert each page of a PDF file to a SWF file.
/*
* Copyright Datalogics, Inc. 2015
*/
package pdfjt.cookbook.document;
import java.io.InputStream;
import java.net.URL;
import pdfjt.util.SampleFileServices;
@JoelGeraci-Datalogics
JoelGeraci-Datalogics / FillFormsFromSQL.java
Created September 1, 2015 23:30
This sample will populate a PDF form based on data in a MySQL database. One PDF per record will be created.
/*
* Copyright Datalogics, Inc. 2015
*/
package pdfjt.cookbook.forms;
import java.io.InputStream;
import java.net.URL;
import java.sql.DriverManager;
import java.sql.Connection;
@JoelGeraci-Datalogics
JoelGeraci-Datalogics / HelloWorld.java
Created September 2, 2015 21:22
This sample allows users to create a new blank PDF and place the text "Hello, World!" onto it. This PDF is saved and written out to a file called HelloWorld.pdf.
/*
* Copyright 2015 Datalogics Inc.
*/
package pdfjt.cookbook.document;
import pdfjt.util.SampleFileServices;
import com.adobe.pdfjt.pdf.document.PDFDocument;
import com.adobe.pdfjt.pdf.document.PDFOpenOptions;
import com.datalogics.pdf.document.DocumentHelper;
@JoelGeraci-Datalogics
JoelGeraci-Datalogics / FillFormsWithImagesFromSQL.java
Last active September 9, 2015 17:25
This sample will populate a PDF form based on data in a MySQL database including image data. One PDF per record will be created. There are 9 records.
/*
* Copyright Datalogics, Inc. 2015
*/
package pdfjt.cookbook.forms;
import java.awt.image.BufferedImage;
import java.io.InputStream;
import java.net.URL;
import java.sql.DriverManager;
@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 / PrintPDF.cs
Created November 9, 2015 19:06
Demonstrates the use of the Adobe PDF Library with the Datalogics Extensions to print a PDF file from the command line without user dialogs.
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using Datalogics.PDFL;
/*
*
* A sample which demonstrates the use of the DLE API to print a PDF file
* without any user dialogs.
@JoelGeraci-Datalogics
JoelGeraci-Datalogics / InsertRichMediaAnnotation_Video.java
Last active March 2, 2016 15:40
Creates a new PDF with a 3D Annotation on the first page
/*
* Copyright Datalogics, Inc. 2015
*/
package pdfjt.cookbook.annotations.richmedia;
import com.adobe.internal.io.LazyRandomAccessFileByteReader;
import com.adobe.pdfjt.core.types.ASName;
import com.adobe.pdfjt.core.types.ASRectangle;
import com.adobe.pdfjt.core.types.ASString;
@JoelGeraci-Datalogics
JoelGeraci-Datalogics / InsertRichMediaAnnotation_StreamingVideo.java
Created March 5, 2016 16:53
Creates a new PDF with a Rich Media Annotation on the first page that plays a streaming video.
/*
* Copyright Datalogics, Inc. 2015
*/
package pdfjt.cookbook.annotations.richmedia;
import com.adobe.internal.io.LazyRandomAccessFileByteReader;
import com.adobe.pdfjt.core.types.ASName;
import com.adobe.pdfjt.core.types.ASRectangle;
import com.adobe.pdfjt.core.types.ASString;
@JoelGeraci-Datalogics
JoelGeraci-Datalogics / Quadrilaterals.java
Created June 2, 2016 17:38
This sample locates words and adds Polygon annotations over the word quads.
/*
* Copyright Datalogics, Inc. 2015
*/
package pdfjt.cookbook.document;
import com.adobe.fontengine.font.Font;
import com.adobe.internal.io.ByteReader;
import com.adobe.internal.io.InputStreamByteReader;
import com.adobe.pdfjt.core.types.ASName;
@JoelGeraci-Datalogics
JoelGeraci-Datalogics / ReplaceImage.java
Last active June 10, 2016 18:49
This sample replaces one image in a PDF file with a new one.
/*
* Copyright Datalogics, Inc. 2015
*/
package pdfjt.cookbook.imaging;
import com.adobe.internal.io.ByteReader;
import com.adobe.internal.io.InputStreamByteReader;
import com.adobe.pdfjt.pdf.document.PDFDocument;
import com.adobe.pdfjt.pdf.document.PDFOpenOptions;