You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Mike Ferrando <mi...@yahoo.com> on 2008/08/21 06:27:55 UTC

Suggested Additions to FOP code

Friends,
I suggest that the following classes be enhanced:

FOUserAgent.java (org.apache.fop.cli.)
  private String subject
  >set and getter methods

PDFRenderer.java (org.apache.fop.render.pdf)
  added line to method: startRenderer
  Line: this.pdfDoc.getInfo().setSubject(userAgent.getSubject());

I was able to get dc:description in my XMP metadata as a result of this simple change.

Sincerely,
Mike Ferrando
Washington, DC



      

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Suggested Additions to FOP code

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
On 21.08.2008 12:47:22 Mathias Brossard wrote:
> Jeremias Maerki wrote:
> > I'll look into it. Did you know that you can also specify an XMP packet
> > in the fo:declarations element of XSL-FO?
> > http://wiki.apache.org/xmlgraphics-fop/HowTo/XMP
> 
> The link you have suggested, states that « This works only with FOP
> trunk. » but because the page was « last edited 2006-08-31 09:14:08 by
> JeremiasMaerki », I'm guessing that it should work with version 0.95.

I don't remember exactly but I think it should work since 0.93. The
information simply hasn't made it to the main FOP website, yet. That's
something on my task list for the next days. At any rate, the Wiki page
is not obsolete (just a bit outdated, see below).

> Testing with fo:declarations (declaration.xml), I don't get the result I
> expect in Acrobat Reader (8.1.2) Document Properties:
> - Title, Author and Application are as expected.
> - Subject is absent.
> - Keywords contains « "foo, bar, baz" ; Subject »
> 
> In the PDF File, there is no "/Subject" line.
> 
> Now, if I change dc:subject to dc:description, Subject and Keywords are
> now correctly displayed (except for quotes around keywords). Now in the
> PDF file, I find out that there is a "/Subject" line, which means FOP
> actually interpreted dc:description as the subject.
> 
> Could someone tell me if this is an Acrobat Reader work-around or that
> the page is obsolete and that the correct mapping is with dc:description
> (and not dc:subject) ?

The mapping from dc:description to /Subject is the one specified in the
PDF/A-1 specification (ISO 19005-1:2005, Technical Corrigendum 1). I
will note that down when I port the information from the Wiki to the
main website.

> Sincerely,
> -- 
> Mathias Brossard




Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Suggested Additions to FOP code

Posted by Mathias Brossard <ma...@opentrust.com>.
Jeremias Maerki wrote:
> I'll look into it. Did you know that you can also specify an XMP packet
> in the fo:declarations element of XSL-FO?
> http://wiki.apache.org/xmlgraphics-fop/HowTo/XMP

The link you have suggested, states that � This works only with FOP
trunk. � but because the page was � last edited 2006-08-31 09:14:08 by
JeremiasMaerki �, I'm guessing that it should work with version 0.95.

Testing with fo:declarations (declaration.xml), I don't get the result I
expect in Acrobat Reader (8.1.2) Document Properties:
- Title, Author and Application are as expected.
- Subject is absent.
- Keywords contains � "foo, bar, baz" ; Subject �

In the PDF File, there is no "/Subject" line.

Now, if I change dc:subject to dc:description, Subject and Keywords are
now correctly displayed (except for quotes around keywords). Now in the
PDF file, I find out that there is a "/Subject" line, which means FOP
actually interpreted dc:description as the subject.

Could someone tell me if this is an Acrobat Reader work-around or that
the page is obsolete and that the correct mapping is with dc:description
(and not dc:subject) ?

Sincerely,
-- 
Mathias Brossard

Re: Suggested Additions to FOP code

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
I'll look into it. Did you know that you can also specify an XMP packet
in the fo:declarations element of XSL-FO?
http://wiki.apache.org/xmlgraphics-fop/HowTo/XMP

On 21.08.2008 06:27:55 Mike Ferrando wrote:
> Friends,
> I suggest that the following classes be enhanced:
> 
> FOUserAgent.java (org.apache.fop.cli.)
>   private String subject
>   >set and getter methods
> 
> PDFRenderer.java (org.apache.fop.render.pdf)
>   added line to method: startRenderer
>   Line: this.pdfDoc.getInfo().setSubject(userAgent.getSubject());
> 
> I was able to get dc:description in my XMP metadata as a result of this simple change.
> 
> Sincerely,
> Mike Ferrando
> Washington, DC
> 
> 


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org