ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Added licensing information to PDF
@ 2012-07-31 11:26 Tobias Mueller
  2012-08-01  7:21 ` Philipp Gesang
  0 siblings, 1 reply; 6+ messages in thread
From: Tobias Mueller @ 2012-07-31 11:26 UTC (permalink / raw)
  To: ntg-context

Hi :-)

I am trying to switch from LaTeX to ConTeXt and I'd like to add licensing information to the generated PDF, just like what the "hyperxmp" package would do for LaTeX.

Something like this:

\setupinteraction[
    title={My Title},
    author={Tobias Mueller},
    keyword={foo bar baz},
    pdfcopyright={This work is licensed to the public under the Creative Commons Attribution-Non-Commercial-Share Alike 3.0 Germany License.},
    pdflicenseurl={http://creativecommons.org/licenses/by-nc-sa/3.0/de/}
    ]

\starttext
Hello, World!
\stoptext


Thanks!
  Tobi
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Added licensing information to PDF
  2012-07-31 11:26 Added licensing information to PDF Tobias Mueller
@ 2012-08-01  7:21 ` Philipp Gesang
  2012-08-01 11:12   ` Peter Rolf
  2012-08-02 20:45   ` Kip Warner
  0 siblings, 2 replies; 6+ messages in thread
From: Philipp Gesang @ 2012-08-01  7:21 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1631 bytes --]

Hi Tobias,

···<date: 2012-07-31, Tuesday>···<from: Tobias Mueller>···

> I am trying to switch from LaTeX to ConTeXt and I'd like to add
> licensing information to the generated PDF, just like what the
> "hyperxmp" package would do for LaTeX.

you can include XMP files with one line:

    \setupbackend[xmpfile=metadata.xmp]

Of course, the XMP needs to be generated beforehand. I was using
the export functionality at http://wiki.creativecommons.org for
this, but maybe Context can do the conversion for you already?

Hth
Philipp


> 
> Something like this:
> 
> \setupinteraction[
>     title={My Title},
>     author={Tobias Mueller},
>     keyword={foo bar baz},
>     pdfcopyright={This work is licensed to the public under the Creative Commons Attribution-Non-Commercial-Share Alike 3.0 Germany License.},
>     pdflicenseurl={http://creativecommons.org/licenses/by-nc-sa/3.0/de/}
>     ]
> 
> \starttext
> Hello, World!
> \stoptext
> 
> 
> Thanks!
>   Tobi
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________

-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

[-- Attachment #1.2: Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Added licensing information to PDF
  2012-08-01  7:21 ` Philipp Gesang
@ 2012-08-01 11:12   ` Peter Rolf
  2012-08-02 20:45   ` Kip Warner
  1 sibling, 0 replies; 6+ messages in thread
From: Peter Rolf @ 2012-08-01 11:12 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Am 01.08.2012 09:21, schrieb Philipp Gesang:
> Hi Tobias,
> 
> ···<date: 2012-07-31, Tuesday>···<from: Tobias Mueller>···
> 
>> I am trying to switch from LaTeX to ConTeXt and I'd like to add
>> licensing information to the generated PDF, just like what the
>> "hyperxmp" package would do for LaTeX.
> 
> you can include XMP files with one line:
> 
>     \setupbackend[xmpfile=metadata.xmp]
>

You can also use some low level commands here (with the risk that names
change or they vanish some time). The risk in this case is very low.
Read the documentation about XMP from Adobe and you will exactly know
why. :-D

Add something like this after \setupinteraction|\setupbackend (they also
add info to the XMP blob).

\startluacode
-- keep the order

-- mark as copyrighted material
lpdf.injectxmpinfo("xml://rdf:RDF","<rdf:Description rdf:about=''
xmlns:xmpRights='http://ns.adobe.com/xap/1.0/rights/'><xmpRights:Marked>True</xmpRights:Marked></rdf:Description>",false)
-- url for copyright information
lpdf.insertxmpinfo("xml://rdf:Description/xmpRights:Marked","<xmpRights:WebStatement>http://www.yoururl.com</xmpRights:WebStatement>",false)
\stopluacode


The adding is also limited to a predefined list of values. See
lpdf-xmp.lua ('mapping') for the details.


Best wishes,  Peter


> Of course, the XMP needs to be generated beforehand. I was using
> the export functionality at http://wiki.creativecommons.org for
> this, but maybe Context can do the conversion for you already?
> 
> Hth
> Philipp
> 
> 
>>
>> Something like this:
>>
>> \setupinteraction[
>>     title={My Title},
>>     author={Tobias Mueller},
>>     keyword={foo bar baz},
>>     pdfcopyright={This work is licensed to the public under the Creative Commons Attribution-Non-Commercial-Share Alike 3.0 Germany License.},
>>     pdflicenseurl={http://creativecommons.org/licenses/by-nc-sa/3.0/de/}
>>     ]
>>
>> \starttext
>> Hello, World!
>> \stoptext
>>
>>
>> Thanks!
>>   Tobi
>> ___________________________________________________________________________________
>> If your question is of interest to others as well, please add an entry to the Wiki!
>>
>> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
>> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
>> archive  : http://foundry.supelec.fr/projects/contextrev/
>> wiki     : http://contextgarden.net
>> ___________________________________________________________________________________
> 
> 
> 
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________
> 

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Added licensing information to PDF
  2012-08-01  7:21 ` Philipp Gesang
  2012-08-01 11:12   ` Peter Rolf
@ 2012-08-02 20:45   ` Kip Warner
  2012-08-02 22:19     ` Philipp Gesang
  2012-08-17  8:59     ` Tobias Mueller
  1 sibling, 2 replies; 6+ messages in thread
From: Kip Warner @ 2012-08-02 20:45 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Philipp Gesang, Tobias Mueller


[-- Attachment #1.1: Type: text/plain, Size: 480 bytes --]

On Wed, 2012-08-01 at 09:21 +0200, Philipp Gesang wrote:
> you can include XMP files with one line:
> 
>     \setupbackend[xmpfile=metadata.xmp]

Hey Philipp. I just tried this using an incorrect filename to the
xmpfile parameter and my document still compiled without error, so I'm
wondering if this setup actually does anything at all or if its simply
ignored?

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Added licensing information to PDF
  2012-08-02 20:45   ` Kip Warner
@ 2012-08-02 22:19     ` Philipp Gesang
  2012-08-17  8:59     ` Tobias Mueller
  1 sibling, 0 replies; 6+ messages in thread
From: Philipp Gesang @ 2012-08-02 22:19 UTC (permalink / raw)
  To: Kip Warner; +Cc: ConTeXt ML


[-- Attachment #1.1: Type: text/plain, Size: 930 bytes --]

Hey Kip,

···<date: 2012-08-02, Thursday>···<from: Kip Warner>···

> On Wed, 2012-08-01 at 09:21 +0200, Philipp Gesang wrote:
> > you can include XMP files with one line:
> > 
> >     \setupbackend[xmpfile=metadata.xmp]
> 
> Hey Philipp. I just tried this using an incorrect filename to the
> xmpfile parameter and my document still compiled without error, so I'm
> wondering if this setup actually does anything at all or if its simply
> ignored?

in my case it does as I can see the XMP information embedded in
the PDF. Watch out for a blob that looks like this:

  >>
  stream
  <?xpacket begin="" id="vkuuxfithomqjnyxqsdpagdu"?><x:xmpmeta xmlns:x="adobe:ns:meta/"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
  ...

This should contain your metadata if used correctly, else some
generic stuff. Context is just habitually a bit terse wrt error
messages.

Hth
Philipp





[-- Attachment #1.2: Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Added licensing information to PDF
  2012-08-02 20:45   ` Kip Warner
  2012-08-02 22:19     ` Philipp Gesang
@ 2012-08-17  8:59     ` Tobias Mueller
  1 sibling, 0 replies; 6+ messages in thread
From: Tobias Mueller @ 2012-08-17  8:59 UTC (permalink / raw)
  To: Philipp Gesang; +Cc: mailing list for ConTeXt users

Hey folks :)

Thanks for the replies. Just reading up on the archives.

On Wed, 2012-08-01 at 09:21 +0200, Philipp Gesang wrote:
> you can include XMP files with one line:
> 
>     \setupbackend[xmpfile=metadata.xmp]

uh. Well. As the other mail said, I could also inject my XMP data 
directly. I could also probably use tools like cat, sed and grep to 
inject my XMP data into the PDF. But all that seems way more complicated 
and error prone than just telling the document processor what license I 
want to use and it taking care about the details.

So for the record: Am I assuming correctly that I cannot do something 
easy to use (yet)? I.e. such as
    pdfcopyright={This work is licensed to the public ...},
    pdflicenseurl={http://creativecommons.org/licenses/by-nc-sa/3.0/de/} 

Cheers,
  Tobi
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-08-17  8:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-31 11:26 Added licensing information to PDF Tobias Mueller
2012-08-01  7:21 ` Philipp Gesang
2012-08-01 11:12   ` Peter Rolf
2012-08-02 20:45   ` Kip Warner
2012-08-02 22:19     ` Philipp Gesang
2012-08-17  8:59     ` Tobias Mueller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).