Class PdfUtils
- java.lang.Object
-
- com.netgrif.application.engine.pdf.service.PdfUtils
-
- All Implemented Interfaces:
groovy.lang.GroovyObject
public class PdfUtils extends java.lang.Object implements groovy.lang.GroovyObject
-
-
Constructor Summary
Constructors Constructor Description PdfUtils()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.lang.ObjectaddAllFieldsAndChildFields(org.apache.pdfbox.pdmodel.interactive.form.PDField field, java.util.Map<java.lang.String,java.lang.String> result)static voidaddFieldValues(org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm acroForm, java.lang.String xmlText, java.util.Map<java.lang.String,java.lang.String> fonts)static java.lang.StringaddFont(org.apache.pdfbox.pdmodel.PDDocument document, org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm acroForm, java.lang.String fontPath)static java.io.FileencryptPdfFile(java.lang.String outPdfPath, java.io.File input)static java.io.FileencryptPdfFile(java.lang.String outPdfPath, java.io.File input, java.lang.String ownerPassword)static java.io.FileencryptPdfFile(java.lang.String outPdfPath, java.io.File input, java.lang.String ownerPassword, java.lang.String userPassword)static java.io.FilefillPdfForm(java.lang.String outPdfName, java.io.InputStream pdfFile, java.io.InputStream xmlFile)static java.io.FilefillPdfForm(java.lang.String outPdfName, java.io.InputStream pdfFile, java.lang.String xml)static intgetKEY_LENGTH()groovy.lang.MetaClassgetMetaClass()static java.io.FilemergePdfFiles(java.lang.String outPdfName, java.io.File... files)static floatmmToPoint(float mm)static java.util.Map<java.lang.String,java.lang.String>readPdfForm(java.io.InputStream inputStream)static java.io.FileremovePages(java.io.File pdfFile, int... pages)static java.io.Fileresize(java.io.File inputFile, java.lang.String outputFileName, float left, float right, float up, float down)static java.io.FilesaveToFile(org.apache.pdfbox.pdmodel.PDDocument document, java.lang.String outPdfName)static java.lang.ObjectsetFieldValueAndFont(org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm acroForm, java.lang.Object xmlNode, java.util.Map<java.lang.String,java.lang.String> fonts)voidsetMetaClass(groovy.lang.MetaClass mc)
-
-
-
Method Detail
-
encryptPdfFile
public static java.io.File encryptPdfFile(java.lang.String outPdfPath, java.io.File input, java.lang.String ownerPassword)
-
encryptPdfFile
public static java.io.File encryptPdfFile(java.lang.String outPdfPath, java.io.File input)
-
getMetaClass
public groovy.lang.MetaClass getMetaClass()
- Specified by:
getMetaClassin interfacegroovy.lang.GroovyObject
-
setMetaClass
public void setMetaClass(groovy.lang.MetaClass mc)
- Specified by:
setMetaClassin interfacegroovy.lang.GroovyObject
-
getKEY_LENGTH
public static int getKEY_LENGTH()
-
resize
public static java.io.File resize(java.io.File inputFile, java.lang.String outputFileName, float left, float right, float up, float down)
-
mmToPoint
public static float mmToPoint(float mm)
-
removePages
public static java.io.File removePages(java.io.File pdfFile, int... pages)
-
encryptPdfFile
public static java.io.File encryptPdfFile(java.lang.String outPdfPath, java.io.File input, java.lang.String ownerPassword, java.lang.String userPassword)
-
mergePdfFiles
public static java.io.File mergePdfFiles(java.lang.String outPdfName, java.io.File... files)
-
fillPdfForm
public static java.io.File fillPdfForm(java.lang.String outPdfName, java.io.InputStream pdfFile, java.io.InputStream xmlFile) throws java.lang.IllegalArgumentException- Throws:
java.lang.IllegalArgumentException
-
fillPdfForm
public static java.io.File fillPdfForm(java.lang.String outPdfName, java.io.InputStream pdfFile, java.lang.String xml) throws java.lang.IllegalArgumentException- Throws:
java.lang.IllegalArgumentException
-
addFont
public static java.lang.String addFont(org.apache.pdfbox.pdmodel.PDDocument document, org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm acroForm, java.lang.String fontPath)
-
addFieldValues
public static void addFieldValues(org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm acroForm, java.lang.String xmlText, java.util.Map<java.lang.String,java.lang.String> fonts)
-
setFieldValueAndFont
public static java.lang.Object setFieldValueAndFont(org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm acroForm, java.lang.Object xmlNode, java.util.Map<java.lang.String,java.lang.String> fonts)
-
saveToFile
public static java.io.File saveToFile(org.apache.pdfbox.pdmodel.PDDocument document, java.lang.String outPdfName)
-
readPdfForm
public static java.util.Map<java.lang.String,java.lang.String> readPdfForm(java.io.InputStream inputStream)
-
addAllFieldsAndChildFields
public static java.lang.Object addAllFieldsAndChildFields(org.apache.pdfbox.pdmodel.interactive.form.PDField field, java.util.Map<java.lang.String,java.lang.String> result)
-
-