/*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*/
protected Date creationDate = null;
+ /** Author of the content of the document. */
+ protected String author = null;
+ /** Title of the document. */
+ protected String title = null;
+ /** Set of keywords applicable to this document. */
+ protected String keywords = null;
+
/**
* Sets the InputHandler object for this process
* @param inputHandler holding input file name information
return creationDate;
}
+ /**
+ * Sets the author of the document.
+ * @param author of document
+ */
+ public void setAuthor(String author) {
+ this.author = author;
+ }
+
+ /**
+ * Returns the author of the document
+ * @return author name
+ */
+ public String getAuthor() {
+ return author;
+ }
+
+ /**
+ * Sets the title of the document. This will override any title coming from
+ * an fo:title element.
+ * @param title of document
+ */
+ public void setTitle(String title) {
+ this.title = title;
+ }
+
+ /**
+ * Returns the title of the document
+ * @return title name
+ */
+ public String getTitle() {
+ return title;
+ }
+
+ /**
+ * Sets the keywords for the document.
+ * @param keywords for the document
+ */
+ public void setKeywords(String keywords) {
+ this.keywords = keywords;
+ }
+
+ /**
+ * Returns the keywords for the document
+ * @return the keywords
+ */
+ public String getKeywords() {
+ return keywords;
+ }
+
/**
* Returns the renderer options
* @return renderer options
/*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
this.creator = creator;
}
+ /** @return the title string */
+ public String getTitle() {
+ return this.title;
+ }
+
/**
* set the title string
*
import org.apache.fop.render.RendererContext;
import org.apache.fop.traits.BorderProps;
import org.apache.fop.fo.Constants;
-import org.apache.fop.fo.properties.ColorTypeProperty;
/*
userAgent.getProducer() != null ? userAgent.getProducer() : "");
this.pdfDoc.setCreator(userAgent.getCreator());
this.pdfDoc.setCreationDate(userAgent.getCreationDate());
+ this.pdfDoc.getInfo().setAuthor(userAgent.getAuthor());
+ this.pdfDoc.getInfo().setTitle(userAgent.getTitle());
+ this.pdfDoc.getInfo().setKeywords(userAgent.getKeywords());
this.pdfDoc.setFilterMap(filterMap);
this.pdfDoc.outputHeader(stream);
if (seqTitle != null) {
String str = convertTitleToString(seqTitle);
PDFInfo info = this.pdfDoc.getInfo();
- info.setTitle(str);
+ if (info.getTitle() == null) {
+ info.setTitle(str);
+ }
}
}