The following error messages might be generated if an ODS TEXT= or ODS PDF TEXT= statement is used to write a text string to the ODS PDF destination in which the BACKGROUNDIMAGE, POSTIMAGE, or PREIMAGE style attributes are used to insert one or more images:
ERROR: An exception has been encountered. Please contact technical support and provide them with the following traceback information:
The SAS task name is [OBJECT_EXECUTIVE] ERROR: Read Access Violation OBJECT_EXECUTIVE
Your SAS® session terminates abnormally when this occurs.
The problem occurs in one of the following scenarios:
The problem is more likely to occur in a SAS session that is started using SAS® Enterprise Guide®, where the ACTIVEX device driver is the default.
To circumvent the problem, use the SASPRTC device driver by inserting the following statement before the ODS PDF FILE= statement:
goptions device=sasprtc;
To circumvent the problem in SAS® 9.3, either remove the image or leave the orientation at its original setting.
To circumvent the problem in SAS® 9.4, change the ODS PDF TEXT= or ODS TEXT= code to use PROC ODSTEXT. See the sample code below.
/* Problem */
ods _all_ close;
options orientation=portrait nodate nonumber;
ods pdf file="problem.pdf" notoc;
ods escapechar='^';
title "^S={preimage='logo.jpg'}";
ods pdf text="First page with text and a title with an image";
ods pdf startpage=now;
options orientation=landscape;
title "^S={preimage='logo.jpg'}";
ods pdf text="Second page with text and an image ";
ods pdf text="Orientation has changed";
ods pdf close;
/* Workaround */
ods _all_ close;
options orientation=portrait nodate nonumber;
ods pdf file="workaround.pdf" notoc;
ods escapechar='^';
title "^S={preimage='logo.jpg'}";
proc odstext;
p "First page with text and a title with an image";
run;
ods pdf startpage=now;
options orientation=landscape;
title "^S={preimage='logo.jpg'}";
proc odstext ;
p "Second page with text and an image ";
p "Orientation has changed";
run;
ods pdf close;