From 77467fb13329ffebf62f9fbda48b6e832c977bfe Mon Sep 17 00:00:00 2001 From: Simon Steiner Date: Fri, 31 Jul 2015 14:36:56 +0000 Subject: FOP-2507: PDFVT and Page Piece exception using IF git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1693610 13f79535-47bb-0310-9956-ffa450edef68 --- .../render/pdf/extensions/PDFExtensionHandler.java | 6 ++++++ .../pdf/extensions/PDFPagePieceExtension.java | 25 ++++++++++++++++++++++ .../fop/render/pdf/extensions/PDFVTExtension.java | 25 ++++++++++++++++++++++ 3 files changed, 56 insertions(+) create mode 100644 src/java/org/apache/fop/render/pdf/extensions/PDFPagePieceExtension.java create mode 100644 src/java/org/apache/fop/render/pdf/extensions/PDFVTExtension.java (limited to 'src/java') diff --git a/src/java/org/apache/fop/render/pdf/extensions/PDFExtensionHandler.java b/src/java/org/apache/fop/render/pdf/extensions/PDFExtensionHandler.java index 2d53c33bf..9579acc84 100644 --- a/src/java/org/apache/fop/render/pdf/extensions/PDFExtensionHandler.java +++ b/src/java/org/apache/fop/render/pdf/extensions/PDFExtensionHandler.java @@ -108,6 +108,12 @@ public class PDFExtensionHandler extends DefaultHandler implements ContentHandle } else if (PDFDictionaryType.Info.elementName().equals(localName)) { PDFDocumentInformationExtension info = new PDFDocumentInformationExtension(); collections.push(info); + } else if (PDFDictionaryType.VT.elementName().equals(localName)) { + PDFVTExtension dictionary = new PDFVTExtension(); + collections.push(dictionary); + } else if (PDFDictionaryType.PagePiece.elementName().equals(localName)) { + PDFPagePieceExtension dictionary = new PDFPagePieceExtension(); + collections.push(dictionary); } else if (PDFObjectType.hasValueOfElementName(localName)) { PDFCollectionEntryExtension entry; if (PDFObjectType.Reference.elementName().equals(localName)) { diff --git a/src/java/org/apache/fop/render/pdf/extensions/PDFPagePieceExtension.java b/src/java/org/apache/fop/render/pdf/extensions/PDFPagePieceExtension.java new file mode 100644 index 000000000..34600727c --- /dev/null +++ b/src/java/org/apache/fop/render/pdf/extensions/PDFPagePieceExtension.java @@ -0,0 +1,25 @@ +/* + * 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. + */ + +/* $Id$ */ +package org.apache.fop.render.pdf.extensions; + +public class PDFPagePieceExtension extends PDFDictionaryExtension { + PDFPagePieceExtension() { + super(PDFDictionaryType.PagePiece); + } +} diff --git a/src/java/org/apache/fop/render/pdf/extensions/PDFVTExtension.java b/src/java/org/apache/fop/render/pdf/extensions/PDFVTExtension.java new file mode 100644 index 000000000..22ac56ffe --- /dev/null +++ b/src/java/org/apache/fop/render/pdf/extensions/PDFVTExtension.java @@ -0,0 +1,25 @@ +/* + * 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. + */ + +/* $Id$ */ +package org.apache.fop.render.pdf.extensions; + +public class PDFVTExtension extends PDFDictionaryExtension { + PDFVTExtension() { + super(PDFDictionaryType.VT); + } +} -- cgit v1.2.3