Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

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

TOPICS
Scripting
603
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Advisor , 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

Translate
Advisor ,
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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Aug 24, 2011 Aug 24, 2011
LATEST

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines