Salir
  • Comunidad global
    • Idioma:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티

Can't set documentTitle to a blank string

Community Expert ,
Aug 24, 2011 Aug 24, 2011

I have a client that wants the documentTitle field to be blank for certain PDFs. If I go to File > File Info (in CS5.5) and delete the Document Title and export a PDF, everything is fine. However, if a Document Title is already set and I try to remove it with JavaScript, it doesn't work:

    doc.metadataPreferences.documentTitle = "";

where doc is my document object. If I set it to any other string it works. I tried setting it to a space:

    doc.metadataPreferences.documentTitle = " ";

but that doesn't work either. Any workarounds would be appreciated. Thank you very much.

Rick Quatro

TEMAS
Scripts
602
Traducir
Informe
Directrices de la comunidad
Sé amable y respetuoso, muestra títulos de crédito de la fuente de contenido original y busca duplicados antes de publicar. Más información
community guidelines

correct answers 1 respuesta correcta

Asesor , Aug 24, 2011 Aug 24, 2011

Hey Rick,

Try setting property directly to XMP:

doc.metadataPreferences.setProperty("http://purl.org/dc/elements/1.1/", "title", "");

Hope that helps.

--

Marijan (tomaxxi)

http://tomaxxi.com

Traducir
Asesor ,
Aug 24, 2011 Aug 24, 2011

Hey Rick,

Try setting property directly to XMP:

doc.metadataPreferences.setProperty("http://purl.org/dc/elements/1.1/", "title", "");

Hope that helps.

--

Marijan (tomaxxi)

http://tomaxxi.com

Traducir
Informe
Directrices de la comunidad
Sé amable y respetuoso, muestra títulos de crédito de la fuente de contenido original y busca duplicados antes de publicar. Más información
community guidelines
Community Expert ,
Aug 24, 2011 Aug 24, 2011

Hi Marijan,

This works great! Thank you very much for the quick response. But I have a question: what is the significance of the http://purl.org/dc/elements/1.1/ namespace? How did you know what to use for this? Thanks.

Rick

Traducir
Informe
Directrices de la comunidad
Sé amable y respetuoso, muestra títulos de crédito de la fuente de contenido original y busca duplicados antes de publicar. Más información
community guidelines
Asesor ,
Aug 24, 2011 Aug 24, 2011
MÁS RECIENTES

Let's say I did a lot of research about a year ago about XMP and it's structure

Take a look at "Raw Data" tab inside "File Info" to find namespaces.

For more info about my research, take a look here: http://tomaxxi.com/?s=XMP

Hope that helps.

--

Marijan (tomaxxi)

http://tomaxxi.com

Traducir
Informe
Directrices de la comunidad
Sé amable y respetuoso, muestra títulos de crédito de la fuente de contenido original y busca duplicados antes de publicar. Más información
community guidelines