October 27, 2010

Acrobat was unable to make this document accessible... error

5223946221_737743a7db_o.jpg

The other day I received a PDF file that need to be converted back to Word or text format. But every attempt to save it from Acrobat Pro to Word resulted in the error shown above:

"Acrobat was unable to make this document accessible because of the following error:

Could not save page structure. [12]

Please not that some pages of this document may have been changed. Because of this failure, you are advised to not save these changes."

After some experimentation, the document finally saved. Here are the steps I used to get past the error:

1. Select Save As from the File menu, and choose Adobe PDF Files, Optimized from the Format menu at the bottom of the Save As window. 

AcrobatScreenSnapz001.jpg

2. Before you click "Save", click Settings first. 

3. The PDF Optimizer settings window will open. Select Discard Objects, and click Discard document tags. Click OK to close the Settings window.

5223946373_9d20f9c3bb_b.jpg

4. Then click the Save button to save the document as optimized PDF.

5. Next, choose Save As from the File menu.

6. Select Microsoft Word Document from the Format menu at the bottom of the Save As... window. 

7. UNcheck Regenerate tags to optimize layout if the document is already tagged

5223946271_b3dddc22f9_o.jpg

8. Click OK. The document should now save as Word.

Posted by ellen at 7:44 PM

October 21, 2010

Suddenly blank Inbox in Mail.app IMAP account for Groupwise

I use Groupwise at work, and other accounts for everything else, and I have them all in Mail.app so I can go through all my new mail quickly.

Mail.app cannot do Groupwise calendaring and appointments, so I also use the Mac Groupwise client occasionally.

Imagine my horror one day, when looking in the Groupwise account's Inbox in Mail.app and finding that it was completely empty. Several thousand messages - disappeared!

It turned out that in the Groupwise client, I'd accidentally moved the Mailbox (Groupwise's inbox) into another folder. The Mac Groupwise client is quite "twitchy": it is very easy to move this folder without even noticing you've done it. It only takes a very small motion and less than a second to send it whirling into an unknown folder somewhere else in the tree. It takes a lot longer to FIND the Mailbox folder you've moved, since it can end up almost anywhere. But once you move it back out, your mail will show up again in Mail.app and other mail clients.

Be careful with that mouse!

Posted by ellen at 1:45 PM

October 20, 2010

Enhanced RSS Display script in classic ASP

A very useful Classic ASP script by Peter Thiel displays an RSS feed as a list of article excerpts within a webpage.
 
The screenshot below shows the way the original script displays the RSS feed. A list of article excerpts is displayed in the center column of a portal site..
 
Screen shot 2010-11-20 at 11-20-10  - 4.26.38 PM .jpg  
 
On clicking the Continue reading link, a new window opens, containing the original blog article. It is of course branded differently than the page containing the list of excerpts, which was confusing for our readers (see image below)
SafariScreenSnapz001.jpg.

Enhanced version

The following modified version of the script will display the list of article entries, in the same manner as the original script, but when the "Continue reading" link at the end of each excerpt is clicked, the excerpt simply expands to show the entire article. No new window is opened. This keeps the reader on the same page instead of sending them off to another site, which can be confusing. Make sure you have permission to use the articles before embedding entire people's articles within your own site: in the case shown, we had rights to both the embedded articles and the display site, so it wasn't an issue.

When the reader clicks the Continue readinglink, the entire article is displayed on the page, in place. (See image below)

SafariScreenSnapz003.jpg.
.
There are three files required for this script: the CSS file (rss.css) that controls the styles of each type of RSS node, an include script (inc.rss.asp), and the web page itself (yourFile.asp)
"yourFile.asp" is the page that is browsed by the reader, and will display the feed. 

File: "inc.rss.asp
" to be included in the page that will display the feed. Lines highlighted in red show where the other two files are included in this one. This file "yourFile.asp" is intended as an example of how it might be used - you will need to incorporate the embedding code into your own site.

<script language="vbscript" type="text/vbscript" runat="server">

' ' Simple Rss Feed Reader 1.2 ' ' This source snippet provides easy access to any Rss Feed by wrapping the ' response Xml into class instances with properties. ' ' See http://web.resource.org/rss/1.0/spec for Rss Specification ' ' The script *requires* the use of IIS5+ installations where the ' "Microsoft.XMLDOM" COM object is available. ' ' <author name="Peter Theill" /> ' <date release="2004-04-21T22:57:00Z" /> ' ' ' Retrieves RSS feed from specified URL ' Function GetRss(url) ' create new CRss object and load specified url Dim rss: Set rss = new CRss rss.Url = url Set GetRss = rss End Function Class CRss Private url_ Private channel_ Private Sub Class_Initialize() Set channel_ = Nothing End Sub public Property Get Url Url = url_ End Property Public Property Let Url(v) url_ = v Dim domXml: Set domXml = Server.CreateObject("Microsoft.XMLDOM") domXml.Async = False domXml.SetProperty "ServerHTTPRequest", True domXml.ResolveExternals = True domXml.ValidateOnParse = True domXml.Load(url_)

If (domXml.parseError.errorCode = 0) Then Dim rootNode: Set rootNode = domXml.documentElement If (NOT IsObject(rootNode)) Then Err.Raise vbObjectError + 3, "Xml Data", "No Root element found", "", 0 Exit Property End If Dim channelNode: Set channelNode = rootNode.selectSingleNode("channel") If (NOT IsObject(channelNode)) Then Err.Raise vbObjectError + 4, "Xml Data", "No 'channel' element found", "", 0 Exit Property End If 'read channel info ' Set channel_ = New CRssChannel channel_.Title = channelNode.selectSingleNode("title").Text channel_.Description = channelNode.selectSingleNode("description").Text channel_.Link = channelNode.selectSingleNode("link").Text 'read items within channel Dim objLinks: Set objLinks = rootNode.getElementsByTagName("item") If (IsObject(objLinks)) Then Dim objChild For Each objChild in objLinks Dim ri: Set ri = New CRssItem ri.Title = objChild.selectSingleNode("title").Text ri.Description = objChild.selectSingleNode("description").Text ri.Link = objChild.selectSingleNode("link").Text ri.Content = objChild.selectSingleNode("content:encoded").Text 'Response.Write("content="&ri.Content) channel_.AddItem(ri) Next End If ' release used resources Set rootNode = Nothing Set channelNode = Nothing Set objLinks = Nothing Else Err.Raise vbObjectError + 2, "Xml Data", _ "Unable to parse Xml: " & _ domXml.parseError.reason, _ "", _ 0 End If Set domXml = Nothing End Property Public Property Get Channel Set Channel = channel_ End Property End Class ' // > Class Rss Class CRssChannel Private items_ Public Title Public Description Public Link Public Image Private Sub Class_Initialize() Set items_ = Server.CreateObject("Scripting.Dictionary") End Sub Private Sub Class_Terminate() Set items_ = Nothing End Sub Public Sub AddItem(v) items_.Add items_.Count, v End Sub Public Property Get Items Items = items_.Items End Property Public Property Let Items(v) Set items_ = v End Property End Class ' // > Class CRssChannel Class CRssItem Public Title Public Description Public Link Public Content End Class ' // > Class CRssItem </script>

File: rss.css - stylesheet to be included in yourFile.asp
/*
 * Used to display RSS feeds
 * 
 */

.rss {
	font-family: Tahoma, Verdana, Sans-serif;
	font-size: 11px;
	
}

#feedTable {
width: 426px;
	/*background-color: #f9f9f9;*/
	color: black;
	/*border: 1px solid #ccc;*/

	
}

th.rss {
display:none;
	font-weight: bold;
	/*border-bottom: 3px solid red;*/
}

td.rss{
padding:12px 0 12px 0;
	border-bottom:1px solid #CCC;
}

a.rss, a.rss:visited {
	color:#000;
	font-weight: bold;
	text-decoration: none;
	font-size:12px;
}

a.rss:hover {
	color: red;
}

div.rss {
	
	color: #332211;
		font-family: Tahoma, Verdana, Sans-serif;
	font-size: 11px;
}
.rss.description p {
margin-top:0px;
margin-bottom:6px;

}

 
File: yourPage.asp Web page which will display the RSS feed.

<html><title>Facilitator Blog</title> <script>document.title='Facilitator Blog';</script> <script language="javascript" > function toggle(id){ var excerpts = getElementsByClass(document,'excerpt','div'); for(var j=0; j<excerpts.length; j++){ //div[i].style.visibility = 'hidden'; excerpts[j].style.display = 'block'; } var div = getElementsByClass(document, 'toggle', 'div'); for(var i=0; i<div.length; i++){ //div[i].style.visibility = 'hidden'; div[i].style.display = 'none'; } document.getElementById("short_"+id).style.display = "none"; //document.getElementById("full_"+id).style.visibility = 'visible'; document.getElementById("full_"+id).style.display = "block";

} </script>   ;<;link rel="stylesheet" type="text/css" href="css/rss.css" />

<body>

<!-- #include virtual="/home/includes/inc.rss.asp" --> <style> #headert{font:bold 13px Arial, Helvetica, sans-serif; color:#666; } .style1 {color: #FF0000} </style>

<table id="contentContainerTable" border="0" cellpadding="0" cellspacing="0"> <!--#include virtual="/home/includes/tab_facilitator.asp" --> <tr id="bodyTR" valign="top"> <td class="contentLftCol" > <h2>MLearning Communicator</h2> </td> </tr> <tr> <td class="contentLftCol"> <% Dim rss: Set rss = GetRss("http://umhscompliance.net/wp/?feed=rss2") If (IsObject(rss)) Then Dim chn: Set chn = rss.Channel Response.Write("<table cellspacing='0' cellpadding='4' class='rss' id='feedTable'>") Response.Write("<thead class='rss'>") Response.Write("<th class='rss'>") 'Response.Write("<a href='" & chn.Link & "' class='rss' title='" & chn.Description & "' target='_blank'>" & chn.Title & "</a> RSS feed") Response.Write("</th>") Response.Write("</thead>") Response.Write("<tbody>") Dim lnk For Each lnk in chn.Items Dim itm itm = lnk.link 'Response.Write(itm) Dim itmid itmid = Split(itm,"=")(1) 'Response.Write("itmid="&itmid & "<br/>") Response.Write("<tr class='rssItem'>") Response.Write("<td class='rss'>") Response.Write("<a href='" & lnk.Link & "' class='rss' >" & lnk.Title & "</a>") Response.Write("<div class='excerpt rss description ' id='short_" & itmid & "' >" & Left(lnk.Content,200) & "&nbsp;<a href=""javascript:toggle('"& itmid &"')"">Read More...</a></div>") Response.Write("<div class='toggle rss description' id='full_" & itmid & "' style='display:none'>" & Left(lnk.Content,2000)& "</div>") 'Response.Write("<div class='rss description'><a href='" & chn.Link & "' target='_blank'>Read More</a></div>") Response.Write("</td>") Response.Write("</tr>") Next Response.Write("</tbody>") Response.Write("</table>") ' release used resources Set rss = Nothing Else Response.Write("Could not read RSS from " & rssFeedUrl) End If %></td> <td class="contentRtCol"><div id="feed"></div></td> </tr> </table> <script> makeActive('mnu_nws'); makeActive('mnu_fac'); makeActive('tb_facilitator04');

</script>

</body> </html>

Posted by ellen at 9:15 PM

VB error: Object required: '[string: "foo"]'

When writing a script to display an RSS feed, I got the following error:

Error: Object required: '[string, 136]'
This is because I was using the SET command to create a string, as shown below:

Dim itm
itm = lnk.link
Response.Write(itm)
Dim itmid
Set itmid = Split(itm,"=")(1)

resulted in the error

Error: Object required: '[string, 136]'

where this...

Dim itm  
itm = lnk.link
Response.Write(itm)
Dim itmid
itmid = Split(itm,"=")(1)

..resulted in no errors.

Posted by ellen at 1:36 PM

October 10, 2010

SQL Server: Clone a database with all its objects

A previous post covered the steps to copy table structure and data to a new or existing database.

To copy all the objects (tables, users, constraints, etc.) from one SQL Server database to another database, use the Generate Scripts function in SQL Server Management Studio.

  1. In the Object Explorer, right click the name of the database. Select Tasks > Generate Scripts...



  2. The Script Wizard will open. Click Next.



  3. Select the source database. If you want to copy ALL objects, make sure Script all objects in the selected database is checked. If the box is not checked, you will get a chance to choose the objects you want to include later.

    Click Next.





  4. Make changes to the default options if needed. Click Next.>



  5. Select Script to New Query Window. (If you want to distribute the structure or copy the database to a different server, you may want to choose the option to script to a file instead.) Click Next.




  6. The progress of the scripting process is shown.



  7. A query window will open. The first line is USE [yourdatabasename]. Change the name to the destination database by clicking on the name. A popup menu will open, displaying all the available databases on the server.




  8. Click Execute on the Query Window toolbar to run the script and start the copy.

For further details on all the options available see This article

Posted by ellen at 1:42 PM

Installing .mobileconfig files on iPad (Setting up MWireless and U-M VPN)

Secure wifi networks often require installation of a certificate on mobile devices trying to connect. Apple provides a utility to allow companies to create configuration (".mobilconfig") files for iPhone and iPad that install the appropriate settings and certificates for their wifi network.

These .mobileconfig files can be put on the web for download to the device through Safari, but sometimes this doesn't work. If the web server is not configured with the correct MIME type (application/x-apple-aspen-config for .mobileconfig files), the device's Safari browser may not allow it to be downloaded. The link may not even function at all - it is not clickable in some cases.

If this happens, you can still install the .mobilconfig file by downloading it on a laptop or desktop computer and emailing it to your i-device. When you click on the attachment, it should start the installation process. However, you may have to change the extension to ".der" before emailing it to have it recognized as a certificate.

The University of Michigan has .mobilconfig files available for connection to the MWireless network and U-M VPN, and I found that emailing them to my iPad as described above was the only way I could install them.


Posted by ellen at 10:58 AM

October 7, 2010

Captivate 4 not generating SCORM support files

If you have a Captivate 4 file that refuses to generate any SCORM support files when publishing, check your Publish settings. Make sure that "Fullscreen" is not checked in the publishing settings. Then it will publish fine.


Since you are eliminating the Captivate generated code for maximizing the window, you may want to add that back in. To force the Captivate window to maximize to full-screen upon opening, add the following Dynamic Drive script to the head of your published HTML file:



<script language="JavaScript1.2">

/***********************************************
* Auto Maximize Window Script- © Dynamic Drive (www.dynamicdrive.com)
* This notice must stay intact for use
* Visit http://www.dynamicdrive.com/ for this script and 100's more.
***********************************************/

top.window.moveTo(0,0);
if (document.all) {
top.window.resizeTo(screen.availWidth,screen.availHeight);
}
else if (document.layers||document.getElementById) {
if (top.window.outerHeight top.window.outerHeight = screen.availHeight;
top.window.outerWidth = screen.availWidth;
}
}

</script>

Posted by ellen at 5:08 PM

Captivate 5: Endless "Loading..." screen fix

Captivate 5 has many bugs that have been complete showstoppers for my elearning projects. Among them, there is a problem with SCORM courses that get perpetually stuck on the gray "Loading..." screen. This is because "API.Initialize" is never called.


Thanks to the detective work of Bart Lewis, we have a partial fix.

  1. Publish the Captivate file as SCORM.
  2. Open the HTML wrapper file with the same name as your course.
  3. Find the following line of code:
    strURLParams += (strURLParams==""?"?":"&") + "SCORM_API=" + g_zAPIVersion + "&SCORM_TYPE=" + g_intAPIType;
    
  4. Change that line of code to this:
     
    strURLParams = "?SCORM_API=" + g_zAPIVersion + "&SCORM_TYPE=" + g_intAPIType;
    
  5. Save the HTML file and zip up all the files.
  6. Upload zip to LMS.
Posted by ellen at 4:16 PM

October 4, 2010

Drupal OpenWYSIWYG text editor

openwysiwyg_0.thumbnail.gif

One of the biggest drawbacks of Drupal for several years has been the lack of a single rich-text editor that is totally compatible with all browsers. Two years ago, I tested all of the WYSIWYG modules available at the time, found they were all riddled with bugs and incompatibilities, and finally settled on the YUI editor for a large Drupal site I run.

Unfortunately, it never really worked that well: the site's members upload lots of photos, and it did a poor job of sizing them - users had no idea how to ensure they were not displayed at full resolution - and with 10 megapixel cameras, full resolution is enormous!


The YUI editor doesn't work at all on Webkit browsers (edited text can't be saved), but neither does reverting to plain text to get around that issue: due to a bug, it won't degrade gracefully in incompatible browsers. So Safari and Chrome users were unable to use the site, unless I granted them a special role that removed the editor.

And, it would not work in more than one type of text area: for example, If the YUI editor widget is configured so that it shows up in the the body of the article, it will not also work on the comments areas on the site.

Finally, I had enough of fixing oversized images and explaining the problems to users, and went looking for a replacement. I finally found a better editor, OpenWYSIWYG. This module is compatible with Internet Explorer and FIrefox, but still is not compatible with Webkit (Safari and Chrome). However it DOES degrade gracefully: Safari and Chrome users can still post messages using plain text. Although not an ideal solution, it does work quite well for the browsers it IS compatible with.

My site's members can now upload images without assistance, and because the editor allows users to edit HTML directly, they can paste in the embedding code for videos from nearly any video site.

Screen shot 2010-10-11 at 10-11-10  - 9.44.28 AM .jpg

Screen shot 2010-10-16 at 10-16-10  - 7.05.51 PM .jpg

Posted by ellen at 11:41 AM

October 1, 2010

Audio, but no video on GoToMeeting WMV videos (G2M3 format)

The other day I came across a Windows Media file that would not play correctly on any player on Mac or PC. The audio track played fine, but there was no video - it was black. Nor would any encoding software convert the file to Flash Video, which is what was really needed. 

Looking in Quicktime's Movie Inspector I could at least tell that the video was in "G2M3" format. G2M3 is a proprietary codec, used in GoToMeeting by default when you save a recorded session.

GoToMeeting allows users to record meetings in either G2M3 or in standard Windows Media format. The latter choice is likely to be overlooked by most users, so chances are their recordings will be un-viewable and un-convertable on non-GoToMeeting software. However, even if a GoToMeeting session has been recorded in the proprietary format  you can still convert the file after the fact using a little application called g2mtranscoder that is installed in the GoToMeeting folder.


A PC is required to transcode G2M3 files. If you have only a Mac available, you are unfortunately out of luck. I tried a few of the online media conversion services to see if they could handle these files, but they also rejected the file without converting.

From the GoToMeeting FAQ:

**To view a meeting recorded in the Windows Media format, you will have to wait until the conversion process has finished. GoToMeeting converts the recorded meeting into a Windows Media Player file after the meeting is over to avoid slowing down the computer during the meeting.
***Mac® users cannot record meetings at this time. They can only view meetings recorded in the Windows Media format and may need to click a button to install Windows Media components for QuickTime before viewing.


Click this link to install GoToMeeting, on your PC.

Once GoToMeeting is installed, you'll notice that you will can now view G2M3 videos within Windows Media Player. But conversion tools and other software such as Camtasia, Captivate and Presenter will still not be able to read them. They can be them to standard Windows Media format using the following instructions (thanks to Ben Littler for these)

    1. Navigate to your GoToMeeting program files folder. Typically this will be in C:\Program Files\Citrix\GoToMeeting\320.
    2. Copy your GoToMeeting recording to this directory.
    3. Open the command line. On Vista / Windows 7, click the Start button and in the search box type: cmd and press Enter; in Windows XP, click the Start button, select Run, and type: cmd and press Enter.
    4. Type: cd C:\Program Files\Citrix\GoToMeeting\320\ and press Enter. This should take you to the GTM directory.
    5. Type: g2mtranscoder source=GoToMeetingRecording.wmv (replace with the name of your GTM video).
    6. Hint: you can copy and paste into the command line window by clicking the C:\ icon from the command line window and selecting Edit > Paste.

Once the conversion has completed, the file can be imported or converted as a normal Windows Media file would be.


Posted by ellen at 2:32 PM