BookmarkSubscribeRSS Feed
smol
Fluorite | Level 6

Hi Reeza

 

Once pdf file is created, when we open using Adobe, it looks like document title name is not same as file name. For example, if file name is "test.pdf" after opening in adobe it shows as as "Version 9.4 SAS System Output" which is a document title. Is there anyway to make document title same as file name in VB script? 

smol_0-1684333026068.png

 

 

Thanks very much

Reeza
Super User
No idea unfortunately. You may need to look into how the files are originally generated and if they're from SAS to RTF to PDF, I would instead recommend writing some custom ODS PDF.

If the output is originally from SAS see if you can modify the document properties however you're creating the file.

The code here isn't SAS code, it's VBS so the issue isn't with the conversion, it's before the conversion somewhere.
data_null__
Jade | Level 19


@omka_ wrote:

Hello everyone,,

 

I am trying to convert an RTF file to a PDF file using SAS 9.4. I am not talking about merely changing the ods output from rtf to pdf. Instead, I have a file in a folder that is in RTF format, and I want SAS to use that and convert it with code into a PDF file into another folder. Attached is a sample rtf file. I have read online that you can use the x command to do this but I am not sure about how to write the code. Thanks.


Are you using a Windows version of SAS?  Do you have WORD available on the machine that SAS is running on?  If you open the RTF file in WORD is SAVE-AS-PDF an option?  Are you allowed to use X command?  It can be restricted.

 

Capture.PNG

 

blueskyxyz
Lapis Lazuli | Level 10

This method can work, but it takes more than 1 hour when converting larger RTF files with more than 5000 pages, in this case, your PC will work slowly due to converting.

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!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 33 replies
  • 8281 views
  • 8 likes
  • 7 in conversation