Custom Export Vdoc Widget – Part 1

The “custom export” use case has been implemented many times before, here is one example:

I don’t want to re-invent the wheel, but I think producing a custom D2 exporter is unique enough to warrant a fresh look:

  • Use a D2 widget to set up user options
  • Export to a file share
  • Export a virtual document using nodes as folder names

This implementation can form a base for anyone wishing to do their own


The user would activate the VdocExport widget, then select the virtual document they wish to export.  Selecting the Virtual document will update the widget to verify the top document that should be exported and default the exported folder name.

D2 Screenshot

Clicking export will export PDF renditions of all the documents in the Virtual Document structure:


The servlet will return back to the user with the number of documents that have been exported.



VdocExport.jsp – provide the user the list of options to export and track the virtual document – servlet that exports the related PDF files

The full project is here (look in the folder VdocExport)

Future features and follow up blog posts:

  • Part 2: Allow the user to select the base shared file path (maybe from a list)
  • Use the D2 configurations for export (which would include the signature page and overlays)
  • Add the ability to export virtual document snapshots
  • Better logging – right now the user doesn’t know what went wrong
  • Build and download a giant zip file containing all the documents in the export path
  • Export the metadata into a separate excel document
  • Let the user decide which renditions to export
  • Integrate with the P2 publishing engine
  • Code cleanup





Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s