I have a pl/sql procedure that streams a letter pdf (on file sever) to a web page (see below). For some reason, a letter every now and then will have a missing line of text. None of the text is there on one line, but the last character which might be a '.' or a '-'.

For instance- the line that starts 'This decision', only has the '.'. I can't figure out what is causing this. Any ideas?

Thanks.
Shannon


The Committee has carefully reviewed xxx. Unfortunately, we cannot offer you xxxxxxx at this time due to the competitive nature of the applicant pool.
This decision is especially difficult given your familys affiliation with xxxx.


procedure p_showPDFDoc (opq in szrxadm.szrxadm_id%type, zyn in varchar2, tsr in rowid) is
v_blob_selected BLOB;
v_read_amount integer;
v_read_offset integer;
v_buffer RAW(32767);
lFile BFILE := null;
letter varchar2(60) := null;
dob varchar2(35) := null;


begin




dob := to_date(zyn, 'J');
letter := f_get_filename(opq, dob, tsr);



lFile := BFILENAME('MISC_DIR', letter);



DBMS_LOB.OPEN (lFile, DBMS_LOB.LOB_READONLY);


v_read_amount := 32767;
v_read_offset := 1;
owa_util.mime_header('application/pdf');



begin
loop
dbms_lob.read(lFile,v_read_amount,v_read_offset,v_buffer);
htp.print(utl_raw.cast_to_varchar2(v_buffer));
v_read_offset := v_read_offset + v_read_amount;
v_read_amount := 32767;
end loop;

DBMS_LOB.CLOSE(lFile);

exception
WHEN NO_DATA_FOUND THEN
htp.p('No Letter Found');
DBMS_LOB.CLOSE(lFile);

WHEN OTHERS THEN
htp.p(SQLERRM);
DBMS_LOB.CLOSE(lFile);
end;
end;