removed pdfa3-sample submodule, made mustang main (and only) module, corrected the POM, released 1.4.0 via maven, updated the developer documentation, updated toecount to 0.0.9 to use mustang 1.4.0 via maven repo

This commit is contained in:
Jochen Staerk
2017-05-18 08:41:47 +02:00
parent a60cb07c9b
commit 52f997f271
103 changed files with 395 additions and 1102 deletions

View File

@@ -14,7 +14,7 @@ Running
This project requires Maven to run. Build project with "mvn clean install". This will build the project, test it and install the artifacts to local cache. After that the mustang jar can be used.
More informations in [the mustang documentation](https://github.com/Rayman2200/PDFA3/blob/master/mustang/doc/ZugferdDev.en.pdf?raw=true)).
More informations in [the mustang documentation](https://github.com/ZUGFeRD/mustangproject/blob/master/mustang/doc/ZugferdDev.en.pdf?raw=true)).
Usage
-----

131
dependency-reduced-pom.xml Normal file
View File

@@ -0,0 +1,131 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.mustangproject.ZUGFeRD</groupId>
<artifactId>mustang</artifactId>
<name>Mustang</name>
<version>1.4.0</version>
<description>The Mustang project is a java library to read and write ZUGFeRD meta data inside your invoice PDFs</description>
<url>http://www.mustangproject.org/</url>
<mailingLists>
<mailingList>
<name>User List</name>
<archive>https://groups.google.com/forum/?hl=de#!forum/mustangproject</archive>
</mailingList>
</mailingLists>
<developers>
<developer>
<name>Jochen Stärk</name>
<email>jstaerk@usegroup.de</email>
<roles>
<role>architect</role>
<role>developer</role>
</roles>
</developer>
<developer>
<name>Alexander Schmidt</name>
<email>schmidt.alexander@mail.de</email>
<roles>
<role>developer</role>
</roles>
</developer>
</developers>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
<comments>A business-friendly OSS license</comments>
</license>
</licenses>
<scm>
<connection>scm:git:https://github.com/ZUGFeRD/mustangproject.git</connection>
<developerConnection>scm:git:https://github.com/ZUGFeRD/mustangproject.git</developerConnection>
<tag>v1.4.0</tag>
<url>https://github.com/ZUGFeRD/mustangproject</url>
</scm>
<build>
<plugins>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<configuration>
<altDeploymentRepository>internal.repo::default::file://${project.build.directory}/mvn-repo</altDeploymentRepository>
</configuration>
</plugin>
<plugin>
<groupId>com.github.github</groupId>
<artifactId>site-maven-plugin</artifactId>
<version>0.11</version>
<executions>
<execution>
<phase>deploy</phase>
<goals>
<goal>site</goal>
</goals>
</execution>
</executions>
<configuration>
<message>Maven artifacts for ${project.version}</message>
<noJekyll>true</noJekyll>
<outputDirectory>${project.build.directory}/mvn-repo</outputDirectory>
<branch>refs/heads/mvn-repo</branch>
<includes>
<include>**/*</include>
</includes>
<merge>true</merge>
<repositoryName>mustangproject</repositoryName>
<repositoryOwner>ZUGFeRD</repositoryOwner>
</configuration>
</plugin>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<version>2.4.3</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<artifactSet>
<excludes />
</artifactSet>
</configuration>
</execution>
</executions>
<configuration>
<minimizeJar>true</minimizeJar>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
<exclusions>
<exclusion>
<artifactId>hamcrest-core</artifactId>
<groupId>org.hamcrest</groupId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<distributionManagement>
<repository>
<id>internal.repo</id>
<name>Temporary Staging Repository</name>
<url>file://${project.build.directory}/mvn-repo</url>
</repository>
</distributionManagement>
<properties>
<maven.compiler.compilerVersion>1.6</maven.compiler.compilerVersion>
<github.global.server>github</github.global.server>
<additionalparam>-Xdoclint:none</additionalparam>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>

BIN
doc/MustangDev.en.odt Normal file

Binary file not shown.

View File

@@ -1,66 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.mustangproject.ZUGFeRD</groupId>
<artifactId>mustang</artifactId>
<name>Mustang</name>
<version>1.4.0.0</version>
<description>The Mustang project is a java library to read and write ZUGFeRD meta data inside your invoice PDFs</description>
<url>http://www.mustangproject.org/</url>
<mailingLists>
<mailingList>
<name>User List</name>
<archive>https://groups.google.com/forum/?hl=de#!forum/mustangproject</archive>
</mailingList>
</mailingLists>
<developers>
<developer>
<name>Jochen St<53>rk</name>
<email>jstaerk@usegroup.de</email>
<roles>
<role>architect</role>
<role>developer</role>
</roles>
</developer>
<developer>
<name>Alexander Schmidt</name>
<email>schmidt.alexander@mail.de</email>
<roles>
<role>developer</role>
</roles>
</developer>
</developers>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
<comments>A business-friendly OSS license</comments>
</license>
</licenses>
<build>
<plugins>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<version>2.4.3</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<artifactSet>
<excludes />
</artifactSet>
</configuration>
</execution>
</executions>
<configuration>
<minimizeJar>true</minimizeJar>
</configuration>
</plugin>
</plugins>
</build>
</project>

Binary file not shown.

View File

@@ -1,100 +0,0 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.mustangproject.ZUGFeRD</groupId>
<artifactId>mustang</artifactId>
<version>1.4.0.0</version>
<packaging>jar</packaging>
<name>Mustang</name>
<description>The Mustang project is a java library to read and write ZUGFeRD meta data inside your invoice PDFs</description>
<url>http://www.mustangproject.org/</url>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.4.3</version>
<configuration>
<minimizeJar>true</minimizeJar>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<artifactSet>
<excludes>
<!--exclude>classworlds:classworlds</exclude>
<exclude>junit:junit</exclude>
<exclude>jmock:*</exclude>
<exclude>*:xml-apis</exclude>
<exclude>org.apache.maven:lib:tests</exclude>
<exclude>log4j:log4j:jar:</exclude-->
</excludes>
</artifactSet>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<version>2.2.11</version>
</dependency>
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>preflight</artifactId>
<version>2.0.5</version>
</dependency>
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox</artifactId>
<version>2.0.5</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
</dependencies>
<mailingLists>
<mailingList>
<name>User List</name>
<archive>https://groups.google.com/forum/?hl=de#!forum/mustangproject</archive>
</mailingList>
</mailingLists>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
<comments>A business-friendly OSS license</comments>
</license>
</licenses>
<developers>
<developer>
<name>Jochen Stärk</name>
<email>jstaerk@usegroup.de</email>
<roles>
<role>architect</role>
<role>developer</role>
</roles>
</developer>
<developer>
<name>Alexander Schmidt</name>
<email>schmidt.alexander@mail.de</email>
<roles>
<role>developer</role>
</roles>
</developer>
</developers>
</project>

View File

@@ -1,88 +0,0 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.mustangproject.ZUGFeRD</groupId>
<artifactId>toecount</artifactId>
<version>0.0.8-SNAPSHOT</version>
<name>ZUGFeRD PDF checker</name>
<description>Shows statistics on how many PDFs in a directory are ZUGFeRD-Compliant</description>
<repositories>
<repository>
<id>mustang-mvn-repo</id>
<url>https://raw.github.com/Rayman2200/PDFA3/mvn-repo/</url>
</repository>
<repository>
<id>sonatype-oss-public</id>
<url>https://oss.sonatype.org/content/groups/public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.mustangproject.ZUGFeRD</groupId>
<artifactId>mustang</artifactId>
<version>1.3.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox</artifactId>
<version>1.8.8</version>
</dependency>
<dependency>
<groupId>com.sanityinc</groupId>
<artifactId>jargs</artifactId>
<version>2.0-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>toecount.Toecount</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>toecount.Toecount</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<!-- http://stackoverflow.com/questions/574594/how-can-i-create-an-executable-jar-with-dependencies-using-maven
mvn clean compile assembly:single -->
<!-- or whatever version you use -->
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@@ -1,10 +0,0 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.github.rayman2200</groupId>
<artifactId>mustang-sample-project</artifactId>
<version>1.3.0.1-SNAPSHOT</version>
</parent>
<artifactId>pdfa3-samples</artifactId>
</project>

View File

@@ -1,202 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package pdfbox;
import java.io.IOException;
import java.io.InputStream;
import java.util.GregorianCalendar;
import javax.xml.transform.TransformerException;
import org.apache.jempbox.xmp.XMPMetadata;
import org.apache.jempbox.xmp.XMPSchemaBasic;
import org.apache.jempbox.xmp.XMPSchemaDublinCore;
import org.apache.jempbox.xmp.XMPSchemaPDF;
import org.apache.jempbox.xmp.pdfa.XMPSchemaPDFAId;
import org.apache.pdfbox.pdmodel.PDDocument;
import org.apache.pdfbox.pdmodel.PDDocumentCatalog;
import org.apache.pdfbox.pdmodel.PDDocumentInformation;
import org.apache.pdfbox.pdmodel.PDPage;
import org.apache.pdfbox.pdmodel.common.PDMetadata;
import org.apache.pdfbox.pdmodel.documentinterchange.logicalstructure.PDMarkInfo;
import org.apache.pdfbox.pdmodel.edit.PDPageContentStream;
import org.apache.pdfbox.pdmodel.font.PDFont;
import org.apache.pdfbox.pdmodel.font.PDTrueTypeFont;
import org.apache.pdfbox.pdmodel.graphics.color.PDOutputIntent;
/**
* This is an example that creates a simple PDF/A document.
*/
public class PDFA3File
{
/**
* Create a simple PDF/A-3 document.
* This example is based on HelloWorld example.
* As it is a simple case, to conform the PDF/A norm, are added : - the font
* used in the document - the sRGB color profile - a light xmp block with only
* PDF identification schema (the only mandatory) - an output intent To
* conform to A/3 - the mandatory MarkInfo dictionary displays tagged PDF
* support - and optional producer and - optional creator info is added
*
* @param file
* The file to write the PDF to.
* @param message
* The message to write in the file.
* @throws Exception
* If something bad occurs
*/
public void doIt(String file, String message) throws Exception
{
// the document
PDDocument doc = null;
try
{
doc = new PDDocument();
// now create the page and add content
PDPage page = new PDPage();
doc.addPage(page);
InputStream fontStream = PDFA3File.class.getResourceAsStream("/Ubuntu-R.ttf");
PDFont font = PDTrueTypeFont.loadTTF(doc, fontStream);
// create a page with the message where needed
PDPageContentStream contentStream = new PDPageContentStream(doc, page);
contentStream.beginText();
contentStream.setFont(font, 12);
contentStream.moveTextPositionByAmount(100, 700);
contentStream.drawString(message);
contentStream.endText();
contentStream.saveGraphicsState();
contentStream.close();
PDDocumentCatalog cat = makeA3compliant(doc);
InputStream colorProfile = PDFA3File.class.getResourceAsStream("/sRGB Color Space Profile.icm");
// create output intent
PDOutputIntent oi = new PDOutputIntent(doc, colorProfile);
oi.setInfo("sRGB IEC61966-2.1");
oi.setOutputCondition("sRGB IEC61966-2.1");
oi.setOutputConditionIdentifier("sRGB IEC61966-2.1");
oi.setRegistryName("http://www.color.org");
cat.addOutputIntent(oi);
doc.save(file);
}
finally
{
if (doc != null)
{
doc.close();
}
}
}
/**
* Makes A PDF/A3a-compliant document from a PDF-A1 compliant document (on the
* metadata level, this will not e.g. convert graphics to JPG-2000)
*/
private PDDocumentCatalog makeA3compliant(PDDocument doc) throws IOException, TransformerException
{
PDDocumentCatalog cat = doc.getDocumentCatalog();
PDMetadata metadata = new PDMetadata(doc);
cat.setMetadata(metadata);
// jempbox version
XMPMetadata xmp = new XMPMetadata();
XMPSchemaPDFAId pdfaid = new XMPSchemaPDFAId(xmp);
xmp.addSchema(pdfaid);
XMPSchemaDublinCore dc = xmp.addDublinCoreSchema();
String creator = System.getProperty("user.name");
String producer = "PDFBOX";
dc.addCreator(creator);
dc.setAbout("");
XMPSchemaBasic xsb = xmp.addBasicSchema();
xsb.setAbout("");
xsb.setCreatorTool(creator);
xsb.setCreateDate(GregorianCalendar.getInstance());
// PDDocumentInformation pdi=doc.getDocumentInformation();
PDDocumentInformation pdi = new PDDocumentInformation();
pdi.setProducer(producer);
pdi.setAuthor(creator);
doc.setDocumentInformation(pdi);
XMPSchemaPDF pdf = xmp.addPDFSchema();
pdf.setProducer(producer);
pdf.setAbout("");
// Mandatory: PDF-A3 is tagged PDF which has to be expressed using a
// MarkInfo dictionary (PDF A/3 Standard sec. 6.7.2.2)
PDMarkInfo markinfo = new PDMarkInfo();
markinfo.setMarked(true);
doc.getDocumentCatalog().setMarkInfo(markinfo);
pdfaid.setPart(3);
pdfaid.setConformance("A");/*
* All files are PDF/A-3, setConformance refers
* to the level conformance, e.g. PDF/A-3-B where
* B means only visually preservable, U means
* visually and unicode preservable and A -like
* in this case- means full compliance, i.e.
* visually, unicode and structurally preservable
*/
pdfaid.setAbout("");
metadata.importXMPMetadata(xmp);
return cat;
}
/**
* This will create a hello world PDF/A document. <br />
* see usage() for commandline
*
* @param args
* Command line arguments.
*/
public static void main(String[] args)
{
PDFA3File app = new PDFA3File();
try
{
if (args.length != 2)
{
app.usage();
}
else
{
app.doIt(args[0], args[1]);
}
}
catch (Exception e)
{
e.printStackTrace();
}
}
/**
* This will print out a message telling how to use this example.
*/
private void usage()
{
System.err.println("usage: " + this.getClass().getName() + " <output-file> <Message>");
}
}

View File

@@ -1,285 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package pdfbox;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Collections;
import java.util.GregorianCalendar;
import javax.xml.transform.TransformerException;
import org.apache.jempbox.xmp.XMPMetadata;
import org.apache.jempbox.xmp.XMPSchemaBasic;
import org.apache.jempbox.xmp.XMPSchemaDublinCore;
import org.apache.jempbox.xmp.XMPSchemaPDF;
import org.apache.jempbox.xmp.pdfa.XMPSchemaPDFAId;
import org.apache.pdfbox.cos.COSArray;
import org.apache.pdfbox.cos.COSDictionary;
import org.apache.pdfbox.pdmodel.PDDocument;
import org.apache.pdfbox.pdmodel.PDDocumentCatalog;
import org.apache.pdfbox.pdmodel.PDDocumentInformation;
import org.apache.pdfbox.pdmodel.PDDocumentNameDictionary;
import org.apache.pdfbox.pdmodel.PDEmbeddedFilesNameTreeNode;
import org.apache.pdfbox.pdmodel.PDPage;
import org.apache.pdfbox.pdmodel.common.PDMetadata;
import org.apache.pdfbox.pdmodel.common.filespecification.PDComplexFileSpecification;
import org.apache.pdfbox.pdmodel.common.filespecification.PDEmbeddedFile;
import org.apache.pdfbox.pdmodel.documentinterchange.logicalstructure.PDMarkInfo;
import org.apache.pdfbox.pdmodel.edit.PDPageContentStream;
import org.apache.pdfbox.pdmodel.font.PDFont;
import org.apache.pdfbox.pdmodel.font.PDTrueTypeFont;
import org.apache.pdfbox.pdmodel.graphics.color.PDOutputIntent;
/**
* This is an example that creates a simple PDF/A document.
*/
public class PDFA3FileAttachment
{
/**
* Constructor.
*/
public PDFA3FileAttachment()
{
super();
}
private void attachSampleFile(PDDocument doc) throws IOException
{
PDEmbeddedFilesNameTreeNode efTree = new PDEmbeddedFilesNameTreeNode();
// first create the file specification, which holds the embedded file
PDComplexFileSpecification fs = new PDComplexFileSpecification();
fs.setFile("Test.txt");
COSDictionary dict = fs.getCOSDictionary();
// Relation "Source" for linking with eg. catalog
dict.setName("AFRelationship", "Alternative");
// dict.setName("AFRelationship", "Source");
dict.setString("UF", "Test.txt");
// fs.put(new PdfName("AFRelationship"), new PdfName("Source"));
String payload = "This is a test";
InputStream is = new ByteArrayInputStream(payload.getBytes());
PDEmbeddedFile ef = new PDEmbeddedFile(doc, is);
// set some of the attributes of the embedded file
ef.setSubtype("text/plain");
// ef.setFile(fs);
// ef.getStream().setItem(COSName.UF, fs);
ef.setModDate(GregorianCalendar.getInstance());
// PdfFileSpecification fs = PdfFileSpecification.fileEmbedded(writer,
// src.getAbsolutePath(), src.getName(), null, false, "image/jpeg",
// fileParameter);
// fs.put(new PdfName("AFRelationship"), new PdfName("Source"));
ef.setSize(payload.length());
ef.setCreationDate(new GregorianCalendar());
fs.setEmbeddedFile(ef);
// now add the entry to the embedded file tree and set in the document.
efTree.setNames(Collections.singletonMap("My first attachment", fs));
/**
* Validating file "RE-20131206_22.pdf" for conformance level pdfa-3a The
* key UF is required but missing. The key AFRelationship is required but
* missing. File specification 'Test.txt' not associated with an object.
*/
// attachments are stored as part of the "names" dictionary in the document
// catalog
PDDocumentCatalog catalog = doc.getDocumentCatalog();
PDDocumentNameDictionary names = new PDDocumentNameDictionary(doc.getDocumentCatalog());
names.setEmbeddedFiles(efTree);
catalog.setNames(names);
// // AF entry (Array) in catalog with the FileSpec
// PDAcroForm pdAcroForm = new PDAcroForm(doc);
// COSArray cosArray = new COSArray();
// cosArray.add(fs);
// catalog.setItem("AF", cosArray);
COSDictionary dict2 = catalog.getCOSDictionary();
COSArray array = new COSArray();
array.add(fs.getCOSDictionary()); // see below
dict2.setItem("AF",array);
}
/**
* Create a simple PDF/A-3 document.
* This example is based on HelloWorld example.
* As it is a simple case, to conform the PDF/A norm, are added : - the font
* used in the document - the sRGB color profile - a light xmp block with only
* PDF identification schema (the only mandatory) - an output intent To
* conform to A/3 - the mandatory MarkInfo dictionary displays tagged PDF
* support - and optional producer and - optional creator info is added
*
* @param file
* The file to write the PDF to.
* @param message
* The message to write in the file.
* @throws Exception
* If something bad occurs
*/
public void doIt(String file, String message) throws Exception
{
// the document
PDDocument doc = null;
try
{
doc = new PDDocument();
// now create the page and add content
PDPage page = new PDPage();
doc.addPage(page);
InputStream fontStream = PDFA3FileAttachment.class.getResourceAsStream("/Ubuntu-R.ttf");
PDFont font = PDTrueTypeFont.loadTTF(doc, fontStream);
// create a page with the message where needed
PDPageContentStream contentStream = new PDPageContentStream(doc, page);
contentStream.beginText();
contentStream.setFont(font, 12);
contentStream.moveTextPositionByAmount(100, 700);
contentStream.drawString(message);
contentStream.endText();
contentStream.saveGraphicsState();
contentStream.close();
PDDocumentCatalog cat = makeA3compliant(doc);
attachSampleFile(doc);
InputStream colorProfile = PDFA3FileAttachment.class.getResourceAsStream("/sRGB Color Space Profile.icm");
// create output intent
PDOutputIntent oi = new PDOutputIntent(doc, colorProfile);
oi.setInfo("sRGB IEC61966-2.1");
oi.setOutputCondition("sRGB IEC61966-2.1");
oi.setOutputConditionIdentifier("sRGB IEC61966-2.1");
oi.setRegistryName("http://www.color.org");
cat.addOutputIntent(oi);
doc.save(file);
}
finally
{
if (doc != null)
{
doc.close();
}
}
}
/**
* Makes A PDF/A3a-compliant document from a PDF-A1 compliant document (on the
* metadata level, this will not e.g. convert graphics to JPG-2000)
*/
private PDDocumentCatalog makeA3compliant(PDDocument doc) throws IOException, TransformerException
{
PDDocumentCatalog cat = doc.getDocumentCatalog();
PDMetadata metadata = new PDMetadata(doc);
cat.setMetadata(metadata);
// jempbox version
XMPMetadata xmp = new XMPMetadata();
XMPSchemaPDFAId pdfaid = new XMPSchemaPDFAId(xmp);
xmp.addSchema(pdfaid);
XMPSchemaDublinCore dc = xmp.addDublinCoreSchema();
String creator = System.getProperty("user.name");
String producer = "PDFBOX";
dc.addCreator(creator);
dc.setAbout("");
XMPSchemaBasic xsb = xmp.addBasicSchema();
xsb.setAbout("");
xsb.setCreatorTool(creator);
xsb.setCreateDate(GregorianCalendar.getInstance());
// PDDocumentInformation pdi=doc.getDocumentInformation();
PDDocumentInformation pdi = new PDDocumentInformation();
pdi.setProducer(producer);
pdi.setAuthor(creator);
doc.setDocumentInformation(pdi);
XMPSchemaPDF pdf = xmp.addPDFSchema();
pdf.setProducer(producer);
pdf.setAbout("");
// Mandatory: PDF-A3 is tagged PDF which has to be expressed using a
// MarkInfo dictionary (PDF A/3 Standard sec. 6.7.2.2)
PDMarkInfo markinfo = new PDMarkInfo();
markinfo.setMarked(true);
doc.getDocumentCatalog().setMarkInfo(markinfo);
pdfaid.setPart(3);
pdfaid.setConformance("A");/*
* All files are PDF/A-3, setConformance refers
* to the level conformance, e.g. PDF/A-3-B where
* B means only visually preservable, U means
* visually and unicode preservable and A -like
* in this case- means full compliance, i.e.
* visually, unicode and structurally preservable
*/
pdfaid.setAbout("");
metadata.importXMPMetadata(xmp);
return cat;
}
/**
* This will create a hello world PDF/A document. <br />
* see usage() for commandline
*
* @param args
* Command line arguments.
*/
public static void main(String[] args)
{
PDFA3FileAttachment app = new PDFA3FileAttachment();
try
{
if (args.length != 2)
{
app.usage();
}
else
{
app.doIt(args[0], args[1]);
}
}
catch (Exception e)
{
e.printStackTrace();
}
}
/**
* This will print out a message telling how to use this example.
*/
private void usage()
{
System.err.println("usage: " + this.getClass().getName() + " <output-file> <Message>");
}
}

View File

@@ -1,151 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package pdfbox;
import java.io.InputStream;
import org.apache.jempbox.xmp.XMPMetadata;
import org.apache.jempbox.xmp.pdfa.XMPSchemaPDFAId;
import org.apache.pdfbox.pdmodel.PDDocument;
import org.apache.pdfbox.pdmodel.PDDocumentCatalog;
import org.apache.pdfbox.pdmodel.PDPage;
import org.apache.pdfbox.pdmodel.common.PDMetadata;
import org.apache.pdfbox.pdmodel.edit.PDPageContentStream;
import org.apache.pdfbox.pdmodel.font.PDFont;
import org.apache.pdfbox.pdmodel.font.PDTrueTypeFont;
import org.apache.pdfbox.pdmodel.graphics.color.PDOutputIntent;
/**
* This is an example that creates a simple PDF/A document.
*/
public class PDFAFile
{
/**
* Constructor.
*/
public PDFAFile()
{
super();
}
/**
* Create a simple PDF/A document.
* This example is based on HelloWorld example.
* As it is a simple case, to conform the PDF/A norm, are added : - the font
* used in the document - a light xmp block with only PDF identification
* schema (the only mandatory) - an output intent
*
* @param file
* The file to write the PDF to.
* @param message
* The message to write in the file.
* @throws Exception
* If something bad occurs
*/
public void doIt(String file, String message) throws Exception
{
// the document
PDDocument doc = null;
try
{
doc = new PDDocument();
PDPage page = new PDPage();
doc.addPage(page);
InputStream fontStream = PDFA3File.class.getResourceAsStream("/Ubuntu-R.ttf");
PDFont font = PDTrueTypeFont.loadTTF(doc, fontStream);
// create a page with the message where needed
PDPageContentStream contentStream = new PDPageContentStream(doc, page);
contentStream.beginText();
contentStream.setFont(font, 12);
contentStream.moveTextPositionByAmount(100, 700);
contentStream.drawString(message);
contentStream.endText();
contentStream.saveGraphicsState();
contentStream.close();
PDDocumentCatalog cat = doc.getDocumentCatalog();
PDMetadata metadata = new PDMetadata(doc);
cat.setMetadata(metadata);
// jempbox version
XMPMetadata xmp = new XMPMetadata();
XMPSchemaPDFAId pdfaid = new XMPSchemaPDFAId(xmp);
xmp.addSchema(pdfaid);
pdfaid.setConformance("B");
pdfaid.setPart(1);
pdfaid.setAbout("");
metadata.importXMPMetadata(xmp.asByteArray());
InputStream colorProfile = PDFA3File.class.getResourceAsStream("/sRGB Color Space Profile.icm");
// create output intent
PDOutputIntent oi = new PDOutputIntent(doc, colorProfile);
oi.setInfo("sRGB IEC61966-2.1");
oi.setOutputCondition("sRGB IEC61966-2.1");
oi.setOutputConditionIdentifier("sRGB IEC61966-2.1");
oi.setRegistryName("http://www.color.org");
cat.addOutputIntent(oi);
doc.save(file);
}
finally
{
if (doc != null)
{
doc.close();
}
}
}
/**
* This will create a hello world PDF/A document. <br />
* see usage() for commandline
*
* @param args
* Command line arguments.
*/
public static void main(String[] args)
{
PDFAFile app = new PDFAFile();
try
{
if (args.length != 2)
{
app.usage();
}
else
{
app.doIt(args[0], args[1]);
}
}
catch (Exception e)
{
e.printStackTrace();
}
}
/**
* This will print out a message telling how to use this example.
*/
private void usage()
{
System.err.println("usage: " + this.getClass().getName() + " <output-file> <Message>");
}
}

View File

@@ -1,30 +0,0 @@
package pdfa3;
import org.junit.Test;
import pdfbox.PDFA3File;
import pdfbox.PDFA3FileAttachment;
import pdfbox.PDFAFile;
public class TestPDFA3
{
@Test
public void testPDFA3File()
{
PDFA3File.main(new String[] { "PDFA3File.pdf", "Messsage" });
}
@Test
public void testPDFA3FileAttachment()
{
PDFA3FileAttachment.main(new String[] { "PDFA3FileAttachment.pdf", "Messsage" });
}
@Test
public void testPDFAFile()
{
PDFAFile.main(new String[] { "PDFAFile.pdf", "Messsage" });
}
}

239
pom.xml
View File

@@ -1,87 +1,156 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.github.rayman2200</groupId>
<artifactId>mustang-sample-project</artifactId>
<version>1.4.0-SNAPSHOT</version>
<packaging>pom</packaging>
<scm>
<connection>scm:git:https://github.com/ZUGFeRD/mustangproject.git</connection>
<developerConnection>scm:git:https://github.com/ZUGFeRD/mustangproject.git</developerConnection>
<url>https://github.com/ZUGFeRD/mustangproject</url>
<tag>HEAD</tag>
</scm>
<distributionManagement>
<repository>
<id>internal.repo</id>
<name>Temporary Staging Repository</name>
<url>file://${project.build.directory}/mvn-repo</url>
</repository>
</distributionManagement>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<github.global.server>github</github.global.server>
<additionalparam>-Xdoclint:none</additionalparam><!-- Skip error check for javadoc -->
<maven.compiler.compilerVersion>1.6</maven.compiler.compilerVersion>
</properties>
<modules>
<module>mustang</module>
<module>pdfa3-sample</module>
</modules>
<dependencies>
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox</artifactId>
<version>2.0.5</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<configuration>
<altDeploymentRepository>internal.repo::default::file://${project.build.directory}/mvn-repo</altDeploymentRepository>
</configuration>
</plugin>
<plugin>
<groupId>com.github.github</groupId>
<artifactId>site-maven-plugin</artifactId>
<version>0.11</version>
<configuration>
<message>Maven artifacts for ${project.version}</message> <!-- git commit message -->
<noJekyll>true</noJekyll> <!-- disable webpage processing -->
<outputDirectory>${project.build.directory}/mvn-repo</outputDirectory> <!-- matches distribution management repository url above -->
<branch>refs/heads/mvn-repo</branch> <!-- remote branch name -->
<includes>
<include>**/*</include>
</includes>
<merge>true</merge>
<repositoryName>mustangproject</repositoryName> <!-- github repo name -->
<repositoryOwner>jstaerk</repositoryOwner> <!-- github username -->
</configuration>
<executions>
<!-- run site-maven-plugin's 'site' target as part of the build's normal
'deploy' phase -->
<execution>
<goals>
<goal>site</goal>
</goals>
<phase>deploy</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
<modelVersion>4.0.0</modelVersion>
<groupId>org.mustangproject.ZUGFeRD</groupId>
<artifactId>mustang</artifactId>
<version>1.4.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Mustang</name>
<description>The Mustang project is a java library to read and write ZUGFeRD meta data inside your invoice PDFs</description>
<url>http://www.mustangproject.org/</url>
<scm>
<connection>scm:git:https://github.com/ZUGFeRD/mustangproject.git</connection>
<developerConnection>scm:git:https://github.com/ZUGFeRD/mustangproject.git</developerConnection>
<url>https://github.com/ZUGFeRD/mustangproject</url>
<tag>v1.4.0</tag>
</scm>
<distributionManagement>
<repository>
<id>internal.repo</id>
<name>Temporary Staging Repository</name>
<url>file://${project.build.directory}/mvn-repo</url>
</repository>
</distributionManagement>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<github.global.server>github</github.global.server>
<additionalparam>-Xdoclint:none</additionalparam>
<!-- Skip error check for javadoc -->
<maven.compiler.compilerVersion>1.6</maven.compiler.compilerVersion>
</properties>
<dependencies>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<version>2.2.11</version>
</dependency>
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>preflight</artifactId>
<version>2.0.5</version>
</dependency>
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox</artifactId>
<version>2.0.5</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<configuration>
<altDeploymentRepository>internal.repo::default::file://${project.build.directory}/mvn-repo</altDeploymentRepository>
</configuration>
</plugin>
<plugin>
<groupId>com.github.github</groupId>
<artifactId>site-maven-plugin</artifactId>
<version>0.11</version>
<configuration>
<message>Maven artifacts for ${project.version}</message>
<!-- git commit message -->
<noJekyll>true</noJekyll>
<!-- disable webpage processing -->
<outputDirectory>${project.build.directory}/mvn-repo</outputDirectory>
<!-- matches distribution management repository url above -->
<branch>refs/heads/mvn-repo</branch>
<!-- remote branch name -->
<includes>
<include>**/*</include>
</includes>
<merge>true</merge>
<repositoryName>mustangproject</repositoryName>
<!-- github repo name -->
<repositoryOwner>ZUGFeRD</repositoryOwner>
<!-- github username -->
</configuration>
<executions>
<!-- run site-maven-plugin's 'site' target as part of the build's normal 'deploy' phase -->
<execution>
<goals>
<goal>site</goal>
</goals>
<phase>deploy</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.4.3</version>
<configuration>
<minimizeJar>true</minimizeJar>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<artifactSet>
<excludes>
<!--exclude>classworlds:classworlds</exclude>
<exclude>junit:junit</exclude>
<exclude>jmock:*</exclude>
<exclude>*:xml-apis</exclude>
<exclude>org.apache.maven:lib:tests</exclude>
<exclude>log4j:log4j:jar:</exclude-->
</excludes>
</artifactSet>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<mailingLists>
<mailingList>
<name>User List</name>
<archive>https://groups.google.com/forum/?hl=de#!forum/mustangproject</archive>
</mailingList>
</mailingLists>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
<comments>A business-friendly OSS license</comments>
</license>
</licenses>
<developers>
<developer>
<name>Jochen Stärk</name>
<email>jstaerk@usegroup.de</email>
<roles>
<role>architect</role>
<role>developer</role>
</roles>
</developer>
<developer>
<name>Alexander Schmidt</name>
<email>schmidt.alexander@mail.de</email>
<roles>
<role>developer</role>
</roles>
</developer>
</developers>
</project>

View File

@@ -389,7 +389,7 @@ public class ZUGFeRDExporter implements Closeable {
/***
* Will return a boolean if the inputstream is valid PDF/A-1 and close the input stream
* @param file
* @return
* @return boolean
*/
public boolean isValidA1(InputStream file) {
@@ -1298,7 +1298,7 @@ public class ZUGFeRDExporter implements Closeable {
* 19% VAT (=>190 EUR VAT) and 200 EUR were applicable to 7% (=>14 EUR VAT)
* 190 Eur
*
* @return
* @return HashMap<BigDecimal, VATAmount>
*
*/
private HashMap<BigDecimal, VATAmount> getVATPercentAmountMap() {
@@ -1553,7 +1553,7 @@ public class ZUGFeRDExporter implements Closeable {
/****
* Returns the PDFBox PDF Document
*
* @return
* @return PDDocument
*/
public PDDocument getDoc() {
return doc;

View File

@@ -45,9 +45,7 @@ public class AllowanceChargeReasonCodeType {
/**
* Ruft den Wert der value-Eigenschaft ab.
*
* @return
* possible object is
* {@link String }
* @return String value
*
*/
public String getValue() {

View File

@@ -50,9 +50,7 @@ public class AmountType {
/**
* Ruft den Wert der value-Eigenschaft ab.
*
* @return
* possible object is
* {@link BigDecimal }
* @return BigDecimal net value
*
*/
public BigDecimal getValue() {
@@ -74,9 +72,7 @@ public class AmountType {
/**
* Ruft den Wert der currencyID-Eigenschaft ab.
*
* @return
* possible object is
* {@link String }
* @return String three-Character ISO currency
*
*/
public String getCurrencyID() {

View File

@@ -58,9 +58,7 @@ public class CodeType {
/**
* Ruft den Wert der value-Eigenschaft ab.
*
* @return
* possible object is
* {@link String }
* @return String
*
*/
public String getValue() {
@@ -82,9 +80,7 @@ public class CodeType {
/**
* Ruft den Wert der listID-Eigenschaft ab.
*
* @return
* possible object is
* {@link String }
* @return String
*
*/
public String getListID() {
@@ -106,9 +102,7 @@ public class CodeType {
/**
* Ruft den Wert der listVersionID-Eigenschaft ab.
*
* @return
* possible object is
* {@link String }
* @return String
*
*/
public String getListVersionID() {

View File

@@ -45,9 +45,7 @@ public class CountryIDType {
/**
* Ruft den Wert der value-Eigenschaft ab.
*
* @return
* possible object is
* {@link String }
* @return String
*
*/
public String getValue() {

View File

@@ -53,9 +53,7 @@ public class CreditorFinancialAccountType {
/**
* Ruft den Wert der ibanid-Eigenschaft ab.
*
* @return
* possible object is
* {@link IDType }
* @return IDType IBANID,AccountName or ProprietaryID
*
*/
public IDType getIBANID() {

View File

@@ -53,9 +53,7 @@ public class CreditorFinancialInstitutionType {
/**
* Ruft den Wert der bicid-Eigenschaft ab.
*
* @return
* possible object is
* {@link IDType }
* @return IDType
*
*/
public IDType getBICID() {
@@ -77,9 +75,7 @@ public class CreditorFinancialInstitutionType {
/**
* Ruft den Wert der germanBankleitzahlID-Eigenschaft ab.
*
* @return
* possible object is
* {@link IDType }
* @return IDType
*
*/
public IDType getGermanBankleitzahlID() {
@@ -101,9 +97,7 @@ public class CreditorFinancialInstitutionType {
/**
* Ruft den Wert der name-Eigenschaft ab.
*
* @return
* possible object is
* {@link TextType }
* @return TextType
*
*/
public TextType getName() {

View File

@@ -56,9 +56,7 @@ public class CrossIndustryDocumentType {
/**
* Ruft den Wert der specifiedExchangedDocumentContext-Eigenschaft ab.
*
* @return
* possible object is
* {@link ExchangedDocumentContextType }
* @return ExchangedDocumentContextType
*
*/
public ExchangedDocumentContextType getSpecifiedExchangedDocumentContext() {
@@ -80,9 +78,7 @@ public class CrossIndustryDocumentType {
/**
* Ruft den Wert der headerExchangedDocument-Eigenschaft ab.
*
* @return
* possible object is
* {@link ExchangedDocumentType }
* @return ExchangedDocumentType
*
*/
public ExchangedDocumentType getHeaderExchangedDocument() {
@@ -104,9 +100,7 @@ public class CrossIndustryDocumentType {
/**
* Ruft den Wert der specifiedSupplyChainTradeTransaction-Eigenschaft ab.
*
* @return
* possible object is
* {@link SupplyChainTradeTransactionType }
* @return SupplyChainTradeTransactionType
*
*/
public SupplyChainTradeTransactionType getSpecifiedSupplyChainTradeTransaction() {

View File

@@ -55,9 +55,7 @@ public class DateTimeType {
/**
* Ruft den Wert der dateTimeString-Eigenschaft ab.
*
* @return
* possible object is
* {@link DateTimeType.DateTimeString }
* @return DateTimeType.DateTimeString
*
*/
public DateTimeType.DateTimeString getDateTimeString() {
@@ -112,9 +110,7 @@ public class DateTimeType {
/**
* Ruft den Wert der value-Eigenschaft ab.
*
* @return
* possible object is
* {@link String }
* @return String
*
*/
public String getValue() {
@@ -136,9 +132,7 @@ public class DateTimeType {
/**
* Ruft den Wert der format-Eigenschaft ab.
*
* @return
* possible object is
* {@link String }
* @return String
*
*/
public String getFormat() {

View File

@@ -49,9 +49,7 @@ public class DebtorFinancialAccountType {
/**
* Ruft den Wert der ibanid-Eigenschaft ab.
*
* @return
* possible object is
* {@link IDType }
* @return IDType
*
*/
public IDType getIBANID() {
@@ -73,9 +71,7 @@ public class DebtorFinancialAccountType {
/**
* Ruft den Wert der proprietaryID-Eigenschaft ab.
*
* @return
* possible object is
* {@link IDType }
* @return IDType
*
*/
public IDType getProprietaryID() {

View File

@@ -53,9 +53,7 @@ public class DebtorFinancialInstitutionType {
/**
* Ruft den Wert der bicid-Eigenschaft ab.
*
* @return
* possible object is
* {@link IDType }
* @return IDType
*
*/
public IDType getBICID() {
@@ -77,9 +75,7 @@ public class DebtorFinancialInstitutionType {
/**
* Ruft den Wert der germanBankleitzahlID-Eigenschaft ab.
*
* @return
* possible object is
* {@link IDType }
* @return IDType
*
*/
public IDType getGermanBankleitzahlID() {
@@ -101,9 +97,7 @@ public class DebtorFinancialInstitutionType {
/**
* Ruft den Wert der name-Eigenschaft ab.
*
* @return
* possible object is
* {@link TextType }
* @return TextType
*
*/
public TextType getName() {

View File

@@ -45,9 +45,7 @@ public class DeliveryTermsCodeType {
/**
* Ruft den Wert der value-Eigenschaft ab.
*
* @return
* possible object is
* {@link String }
* @return String
*
*/
public String getValue() {

View File

@@ -49,9 +49,7 @@ public class DocumentCodeType {
/**
* Ruft den Wert der value-Eigenschaft ab.
*
* @return
* possible object is
* {@link String }
* @return String
*
*/
public String getValue() {

View File

@@ -48,9 +48,7 @@ public class DocumentContextParameterType {
/**
* Ruft den Wert der id-Eigenschaft ab.
*
* @return
* possible object is
* {@link IDType }
* @return IDType
*
*/
public IDType getID() {

View File

@@ -51,9 +51,7 @@ public class DocumentLineDocumentType {
/**
* Ruft den Wert der lineID-Eigenschaft ab.
*
* @return
* possible object is
* {@link IDType }
* @return IDType
*
*/
public IDType getLineID() {

View File

@@ -55,9 +55,7 @@ public class ExchangedDocumentContextType {
/**
* Ruft den Wert der testIndicator-Eigenschaft ab.
*
* @return
* possible object is
* {@link IndicatorType }
* @return IndicatorType
*
*/
public IndicatorType getTestIndicator() {

79
toecount/pom.xml Executable file
View File

@@ -0,0 +1,79 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.mustangproject.ZUGFeRD</groupId>
<artifactId>toecount</artifactId>
<version>0.0.9-SNAPSHOT</version>
<name>ZUGFeRD PDF checker</name>
<description>Shows statistics on how many PDFs in a directory are ZUGFeRD-Compliant</description>
<repositories>
<repository>
<id>mustang-mvn-repo</id>
<url>https://raw.github.com/ZUGFeRD/mustangproject/mvn-repo/</url>
</repository>
<repository>
<id>sonatype-oss-public</id>
<url>https://oss.sonatype.org/content/groups/public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.mustangproject.ZUGFeRD</groupId>
<artifactId>mustang</artifactId>
<version>1.4.0</version>
</dependency>
<dependency>
<groupId>com.sanityinc</groupId>
<artifactId>jargs</artifactId>
<version>2.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>toecount.Toecount</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>toecount.Toecount</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<!-- http://stackoverflow.com/questions/574594/how-can-i-create-an-executable-jar-with-dependencies-using-maven mvn clean compile assembly:single -->
<!-- or whatever version you use -->
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>
</project>

Some files were not shown because too many files have changed in this diff Show More