diff --git a/ndn-cpp/encoding/der/visitor/print-visitor.cpp b/ndn-cpp/encoding/der/visitor/print-visitor.cpp
new file mode 100644
index 0000000..ab56b5d
--- /dev/null
+++ b/ndn-cpp/encoding/der/visitor/print-visitor.cpp
@@ -0,0 +1,131 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
+/**
+ * Copyright (C) 2013 Regents of the University of California.
+ * @author: Yingdi Yu <yingdi@cs.ucla.edu>
+ * @author: Jeff Thompson <jefft0@remap.ucla.edu>
+ * See COPYING for copyright and distribution information.
+ */
+
+#include "print-visitor.hpp"
+#include "../der.hpp"
+#include <iostream>
+#include <iomanip>
+
+using namespace std;
+
+namespace ndn {
+
+namespace der {
+
+void 
+PrintVisitor::visit(DerBool& derBool, ndnboost::any param)
+{
+  const string& indent = ndnboost::any_cast<const string&>(param);
+      
+  printData(derBool.getHeader(), indent);
+  printData(derBool.getPayload(), indent + "   ");
+}
+
+void
+PrintVisitor::visit(DerInteger& derInteger, ndnboost::any param)
+{
+  const string& indent = ndnboost::any_cast<const string&>(param);
+      
+  printData(derInteger.getHeader(), indent);
+  printData(derInteger.getPayload(), indent + "   ");
+}
+  
+void
+PrintVisitor::visit(DerPrintableString& derPStr, ndnboost::any param)
+{
+  const string& indent = ndnboost::any_cast<const string&>(param);
+      
+  printData(derPStr.getHeader(), indent);
+  printData(derPStr.getPayload(), indent + "   ");
+}
+
+void 
+PrintVisitor::visit(DerBitString& derBStr, ndnboost::any param)
+{
+  const string& indent = ndnboost::any_cast<const string&>(param);
+      
+  printData(derBStr.getHeader(), indent);
+  const std::vector<uint8_t>& payload = derBStr.getPayload();
+  cout << indent << "   " << " " << hex << setw(2) << setfill('0') << (int)(uint8_t)payload[0] << endl;
+  printData(payload, indent + "   ", 1);
+}
+
+void 
+PrintVisitor::visit(DerNull& derNull, ndnboost::any param)
+{
+  const string& indent = ndnboost::any_cast<const string&>(param);
+      
+  printData(derNull.getHeader(), indent);
+  printData(derNull.getPayload(), indent + "   ");
+
+}
+
+void 
+PrintVisitor::visit(DerOctetString& derOStr, ndnboost::any param)
+{
+  const string& indent = ndnboost::any_cast<const string&>(param);
+      
+  printData(derOStr.getHeader(), indent);
+  printData(derOStr.getPayload(), indent + "   ");
+}
+
+void 
+PrintVisitor::visit(DerOid& derOid, ndnboost::any param)
+{
+  const string& indent = ndnboost::any_cast<const string&>(param);
+	
+  printData(derOid.getHeader(), indent);
+  printData(derOid.getPayload(), indent + "   ");
+
+}
+
+void 
+PrintVisitor::visit(DerGtime& derGtime, ndnboost::any param)
+{
+  const string& indent = ndnboost::any_cast<const string&>(param);
+	
+  printData(derGtime.getHeader(), indent);
+  printData(derGtime.getPayload(), indent + "   ");
+}
+
+void 
+PrintVisitor::visit(DerSequence& derSequence, ndnboost::any param)
+{
+  const string& indent = ndnboost::any_cast<const string&>(param);
+  
+  printData(derSequence.getHeader(), indent);
+
+  const DerNodePtrList& children = derSequence.getChildren();
+  DerNodePtrList::const_iterator it = children.begin();
+  for(; it != children.end(); it++)
+	(*it)->accept(*this, indent + " | ");
+}
+
+
+void 
+PrintVisitor::printData(const vector<uint8_t>& blob, const string& indent, int offset)
+{
+  cout << indent;
+
+  int count = 0;
+  for(int i = offset; i < blob.size(); i++)
+    {
+      cout << " " << hex << setw(2) << setfill('0') << (int)blob[i];
+      count++;
+      if(8 == count)
+        {
+          count = 0;
+          cout << "\n" << indent;
+        }
+    }
+  cout << endl;
+}
+
+} // der
+
+}
diff --git a/ndn-cpp/encoding/der/visitor/print-visitor.hpp b/ndn-cpp/encoding/der/visitor/print-visitor.hpp
new file mode 100644
index 0000000..45d0bfd
--- /dev/null
+++ b/ndn-cpp/encoding/der/visitor/print-visitor.hpp
@@ -0,0 +1,40 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
+/**
+ * Copyright (C) 2013 Regents of the University of California.
+ * @author: Yingdi Yu <yingdi@cs.ucla.edu>
+ * @author: Jeff Thompson <jefft0@remap.ucla.edu>
+ * See COPYING for copyright and distribution information.
+ */
+
+#ifndef NDN_PRINT_VISITOR_HPP
+#define NDN_PRINT_VISITOR_HPP
+
+#include <vector>
+#include <string>
+#include "void-visitor.hpp"
+
+namespace ndn {
+
+namespace der {
+
+class PrintVisitor : public VoidVisitor {
+public:
+  virtual void visit(DerBool&,             ndnboost::any);
+  virtual void visit(DerInteger&,          ndnboost::any);
+  virtual void visit(DerPrintableString&,  ndnboost::any);
+  virtual void visit(DerBitString&,        ndnboost::any);
+  virtual void visit(DerNull&,             ndnboost::any);
+  virtual void visit(DerOctetString&,      ndnboost::any);
+  virtual void visit(DerOid&,              ndnboost::any);
+  virtual void visit(DerSequence&,         ndnboost::any);
+  virtual void visit(DerGtime&,            ndnboost::any);
+
+private:
+  static void printData(const std::vector<uint8_t>& blob, const std::string& indent, int offset = 0);
+};
+
+} // der
+
+}
+
+#endif
