binary - SAS : read in PDF file -
binary - SAS : read in PDF file -
i looking ways read in pdf file sas. apparently not basic functionality , there little found on internet. (let lone google not easy pdf in search giving links pdf documents go other things.)
the things can found, people looking ways import info datasets pdf. me, not necesarry. able read contents of pdf file in 1 big character variable. if possible, improve able read in file's binary data.
is possible sas , how? (i got work in access vba, can't find similar ways in sas.)
(in end, purpose convert base64 , set base64-string xml document.)
you not able read entire file 1 character variable since maximum size of character variable around 33 kb. simple way read in 1 line @ time, though, following:
%let pdffilename = test.pdf; %let linesize = 2000; info base; format text_line $&linesize..; infile "&pdffilename" lrecl=&linesize; input text_line $; run;
this requires have general thought of maximum record length ahead of time, write additional code determine maximum record size prior reading in file. in illustration each line of text read 1 character variable named "text_line." there, utilize retain statement or double trailers (@@) in input line process multiple lines @ time. sas web-site has plenty of documentation on how read , process text various types of input files.
pdf binary sas
Comments
Post a Comment