[Non-SharePoint] How to get PDF file from emails sent from scanner


I recently scanned a document using that fancy multi-functions printer and the scanner can send me the scanned document through email. But, after getting back to my desk, I found 3 different emails from the scanner. Each email contains a DAT file. Scratching my head not knowing what to do, I ventured to good-ole Google to find out what to do. The following steps allow me to get the PDF file:

 

1. Save the DAT file attachment from all the emails to local drive

2. Open console, and execute copy "myfilepart1.DAT"+"myfilepart2.DAT"+myfilepart3.DAT myfile.DAT

3. Note that the above command contain a blank space before the last file name for the result file.

4. Use WinZIP to open the file (start WinZip and use File > Open). WinZip is capable to handle and understand this file (it contains 2 files, text file that contains the information and PDF file of scanned document)

5. Bang, you have your PDF file.

 

Couple side notes:

1. The reason you received multiple emails is because the scanned file is too big, thus the scanner needs to split them.

2. Some people suggest using UUEncoder and UUDecoder. I haven’t tried it, since I figured it is easier to download evaluation version of WinZip and use it to get my scanned document.

3. Do not assume this method will work for any DAT files. DAT file is basically just a data file and you should use specific application that creates this DAT file to open it. The above procedures only work for this very specific case.

Use content editor webpart to search on a specific list


I recently tinkered with content editor webpart to see what kind of stuff I can achieve with this readily available webpart. I set a simple form using content editor that allows me to quickly enter a simple search term to search on a particular list. My example is to search staff resume on a resume document library in the portal.

I know when I search using my name with scope limited to resume document library, the search url will be http://myporta/people/_layouts/OSSSearchResults.aspx?k=yaohan&cs=This List&u=http:\\myportal\staff resumes

This is very useful information, because what it means is the matter of setting up a content editor webpart that allows me to build a redirection url with query string consist of the search term entered in the textbox.

I encountered a stumbling block originally, because content editor webpart does not allow form tags, since the whole SharePoint page is just one big form, thus you cannot have inner form.

So instead of using form tag, I just use a simple div as a container (not that I really need it). What you can do is just add the content editor webpart on your page, and edit the source. Place a similar code like below to display a simple textbox and a button and the javascript function will find the input textbox and build a redirection url using the value in the textbox.

 

Code Snippet:

<script type="text/javascript">
function submitCVSearch(containerElement) {

    var staffName = document.getElementsByName(‘oaktonStaffName’)[0].value;

    var searchUrl = "http://myportal/people/_layouts/OSSSearchResults.aspx?cs=This%20List&u=http%3A%2F%2Fmyportal%2Fstaff%20resumes&&quot;;

    var searchUrlForStaffCV = searchUrl + "k=" + staffName;

    window.location.href = searchUrlForStaffCV;

}
</script>

<div id="searchForm" onkeydown="javascript:if (event.keyCode==13) submitCVSearch(‘searchForm’)">
    <input name="oaktonStaffName" type="text"/><input type="button" onclick="submitCVSearch(‘searchForm’)" value="Search" />
</div>

 

This is another great way to provide simple webpart to quickly enable users to search on a specific useful list without having the results getting cluttered from other portal search results.