BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
formerRuser
Fluorite | Level 6

Hello community,

 

I am using ODS PDF to create PDFs in SAS 9.4, and I'm encountering a problem when adding keywords to the properties/metadata for my PDFs (using this: http://support.sas.com/documentation/cdl/en/graphref/65389/HTML/default/viewer.htm#p01sq0s49g1pxon1p...)

 

In the properties of the PDFs for Keywords I want to see this:

key word1, key word2, key word3

 

My keywords have spaces in them, so I need to separate them with commas to meet company guidelines. However, if I write keywords="key word1, key word2, key word3" then double quotation marks show up around the entire list in the properties. If I write keywords="key word1 key word2 key word3" then I don't get double quotation marks in the properties, but I don't get my commas either. Semi-colons do not work either.

 

Is there any way that I can get commas between my keywords but not have quotation marks around the entire list? I need two word keywords to be recognized as one unit and not two separate keywords. Manually deleting the quotation marks after production is not feasible because I am generating thousands of PDFs.

 

Thank you in advance. I searched but could not find an answer to this elsewhere.

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ

Hi, Taking SAS out of the picture, I made a test document with Word and put keyword tags into Word without any quotes and with a comma separating the 2 keywords, as shown below:

keywords.png

 

Apparently, something in the creation of the PDF file causes the quotes to be added and it is not something unique to SAS, since it happens when SAS is not involved in making the PDF file.

 

  So I think you are dealing with Adobe behavior the requires quotes because as long as there is no punctuation like commas or colons, etc, I get this in the PDF file:

no_quotes_keyword.png

 

Hope this helps,

 

Cynthia

View solution in original post

7 REPLIES 7
formerRuser
Fluorite | Level 6

Hello,

 

Here's the code which produces commas but also produces quotation marks:

 

ods pdf file="filepath\filename.pdf"
title = "title of PDF"
author = "author here"
subject = "subject here"
keywords = "keyword, keyword, key word, key word, key word"
style = manual_style
dpi=500
accessible
notoc;

 

I've also tried single quotation marks, but it still produces double quotation marks.

Reeza
Super User
I ran into this problem in 2013 and we had to use a small Adobe JS script to fix it in the end. It was a pain. I hope there's a better solution today! Otherwise, if you have access to Adobe Pro, the scripting tools are quite handy.
formerRuser
Fluorite | Level 6

Well it's good to know I'm not alone. I hope so, too. I do not currently have access to Adobe Pro unfortunately, but thank you for the suggestion.

Cynthia_sas
SAS Super FREQ

Hi, Taking SAS out of the picture, I made a test document with Word and put keyword tags into Word without any quotes and with a comma separating the 2 keywords, as shown below:

keywords.png

 

Apparently, something in the creation of the PDF file causes the quotes to be added and it is not something unique to SAS, since it happens when SAS is not involved in making the PDF file.

 

  So I think you are dealing with Adobe behavior the requires quotes because as long as there is no punctuation like commas or colons, etc, I get this in the PDF file:

no_quotes_keyword.png

 

Hope this helps,

 

Cynthia

formerRuser
Fluorite | Level 6

Okay that's interesting. Thank you for investigating!

Tom
Super User Tom
Super User

Why do your keywords include spaces?

If you must use spaces in your keywords then perhaps you can use some other character like | ^ ! ~ + to separate the multiple "words".

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 7 replies
  • 1260 views
  • 4 likes
  • 5 in conversation