File Does Not Begin with '%Pdf-' when Producing Pdf with SRW Package (Doc ID 312831.1)

Last updated on JUNE 13, 2016

Applies to:

Oracle Reports Developer - Version 9.0.4.0 to 11.1.2.0.0 [Release Oracle9i to 11g]
Information in this document applies to any platform.
***Checked for relevance on 26-Oct-2012***


Symptoms

When running a report via Event-Driven Publishing using the SRW packages and attempting to send it to PDF output, the resulting output does not open or errors out when attempting to open it.

Example of problematic code submitted to the SRW package:


DECLARE
  myPlist SRW_PARAMLIST;
  myIdent SRW.Job_Ident;
  myStatus SRW.Status_Record;
BEGIN
  utl_http.set_transfer_timeout(3600);
  myPlist := SRW_PARAMLIST(SRW_PARAMETER('',''));
  
 SRW.add_parameter(myPlist,'GATEWAY','http://server1.us.com:7778/reports/rwservlet');
  SRW.add_parameter(myPlist,'SERVER','rep_server1');
  SRW.add_parameter(myPlist,'REPORT','/opt/reports/RPSTST.rdf');
  SRW.add_parameter(myPlist,'USERID',scott/tiger@discodemo');
  SRW.add_parameter(myPlist,'destype','file');
 
SRW.add_parameter(myPlist,'desname','/opt/output/test08834054.pdf');
  SRW.add_parameter(myPlist,'jobname','test08834054');
  SRW.add_parameter(myPlist,'P_Report_Description','Test');
  myIdent := srw.run_report(myPlist);
  myStatus := srw.report_status(myIdent);
  DBMS_OUTPUT.put_line (to_char(myIdent.JobID));
END;
 
Error:
---------
file does not begin with '%PDF-' when opening the file in Internet Explorer.

The file cannot be opened directly in Acrobat Reader either.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms