BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
rahul8krk
Calcite | Level 5

Hi,

 

Please may I know, if it possible to add an OMR mark to a PDF output using ODS and template procedure.

I have seen how to add an watermark and used this code which is already available.

 

proc template;
    define style watermark;
    parent=styles.printer;
    style header from header /
          background=_undef_;
    style body from document /
          background=_undef_
          backgroundimage="watermark.jpg";
  end;
  run;

  ods pdf file="test.pdf" style=watermark;
  proc report data = sashelp.class nowd;
  run;
  ods pdf close;

Please may I know if I have any specific style in order to get OMR on PDF output, or do I need to define a new style.

 

Thankyou all for your help and time.

 

Regards,

Rahul

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ

Hi:
RW9 is correct -- the ODS PDF destination does NOT have a way to invoke JavaScript to alter the document. This is a very old user group paper that outlines reading OMR data with SAS, but not how to put the OMR into a PDF file -- http://www2.sas.com/proceedings/sugi26/p120-26.pdf

Then, this paper http://support.sas.com/resources/papers/proceedings13/099-2013.pdf also mentions OCR and OMR but in the context, again, of reading the data, not making the form or making the OMR in a file.

I believe that Adobe has something called a "Form Wizard" for making forms, that is not something you could interface to using ODS PDF.

cynthia

View solution in original post

5 REPLIES 5
RW9
Diamond | Level 26 RW9
Diamond | Level 26

I cannot find anything PDF Optical mark recognition related, so this isn't part of the base PDF package (unless its called something else?).  How do you do this normally - i.e. if you did it outside of SAS completely, is it a third party apllication or plugin?  If so I don't think you would be able to do it through SAS< you would need a manual step after the output process has completed.  Never heard of the term myself.

rahul8krk
Calcite | Level 5

Hi,

 

As far as I know, an OMR mark is added to pdf by using Javascript. 

 

Actally, what I am trying to do is, I am able to generate a PDF document using SAS ODS and after that the PDF file needs to be folded at the bottom of the letter. Curretly this is done manually. If, I am able to add an OMR mark by using SAS to the PDF then the machine will recognise the OMR mark and it will fold the letter at the location of the OMR mark.

 

I would like to know if you have ever come across this type of situation. I have read papers on adding watermark and making it transparent. Unfortunately, there is nothing related to adding an OMR mark.

 

I hope someone might have done this.

 

Thank you very much for your reply.

 

Regards,

Rahul

RW9
Diamond | Level 26 RW9
Diamond | Level 26

"PDF file needs to be folded at the bottom of the letter" - is this some mechanical process or do you mean page break?  Anyways, I don't think you can trigger Javascript from a template/output to PDF.  You could of course have an external trigger for that, generate the PDF as normal from SAS, and then call a batch file which runs some javascript over the exported PDF to add this OMR.  It would be outside the scope of a SAS forum though, maybe have an empty PDF with the Javascript in it, then your output from SAS is merged with that to create a new file, and the command is triggered to add in at close?  Not sure really never heard of this, PDF is just and end destination for me.

Cynthia_sas
SAS Super FREQ

Hi:
RW9 is correct -- the ODS PDF destination does NOT have a way to invoke JavaScript to alter the document. This is a very old user group paper that outlines reading OMR data with SAS, but not how to put the OMR into a PDF file -- http://www2.sas.com/proceedings/sugi26/p120-26.pdf

Then, this paper http://support.sas.com/resources/papers/proceedings13/099-2013.pdf also mentions OCR and OMR but in the context, again, of reading the data, not making the form or making the OMR in a file.

I believe that Adobe has something called a "Form Wizard" for making forms, that is not something you could interface to using ODS PDF.

cynthia

rahul8krk
Calcite | Level 5

Hi...

 

Cynthis_sas and RW9 thank you for your time and answers.

 

Regards,

Rahul

 

 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 5 replies
  • 3164 views
  • 0 likes
  • 3 in conversation