How to serve up print-documents on the web?

23 11 2009

In a quest for continuous improvement, we’re having a think about our study guides. Most authors have their documents online for students, be it PDFs (mostly) or word docs.. what the students do with those documents, I’m not entirely sure, and as far as I know, there’s no stats or research that might answer that question.

Even the stats for the eStudyGuide pages (discussed in earlier post – taking the xml from indesign to make a web front end for the study guides) don’t indicate any trend, the stats only show that people are looking at the front end, from where, for how long etc. Actually, there’s a possible answer there, I wonder if there’s any server stats on the PDFs, would the stats indicate how long the document is open in the browser, or would the stats just record the hit? I’ll have to find out. There’s got to be some data we can look at to know more about usage.

In the mean time, tell me what you would do with a PDF study guide if you were studying:

So, anyway, back to the point of this, what is really the best way to serve up the documents online? If students are indeed reading on screen, perhaps we should put some time into looking at a better way to present it all, Adobe Digital Editions for instance might be a winner. Like Acrobat Reader, its a free program, but it’s for managing and viewing eBooks. Students would be able to manage and read all their study guides on their computer (making them more convenient, mobile, and so on), plus, the epub format would be easy as to spit out of InDesign (what our study guides are created in).





Web front end for InDesign docs

5 11 2009

Well well.. I’ve been out of touch with the InDesign stuff I was really getting in to last year.  Other projects, as well as the restructure and fallout from that.  I did however pick things up a little just recently, and finished making a first draft front end to display the Study Guides from InDesign.

As you may/may not know, part of our InDesign process with the study guides allows us to export XML from the Table Of Contents (TOC).  This is a great spot to get some really usable data about the document, for instance, how many chapters and what are the chapter titles!

After creating the PDFs, and exporting the XML from the TOC, we simply dump it all on a web server.  I made a nice little PHP page that takes requests and displays an interface for students to download those PDFs – the PHP reads the requested course’s XML file, creates the list with the chapter titles and so on.

Why’d I bother doing this?  A couple of reasons really… Well okay a few:

  • Its fun.
  • It saves academics time by setting up a page for them where students can download the chapterised PDFs for their Study Guide.
  • It also saves the academic the time of splitting their whole document PDFs up in to chapter PDFs, because we do it.

It works well for us really, I mean, all we do is export the goods and throw it on a server, it couldn’t be more simple.  The outcome is really quite nice.  Next challenge will be how to integrate this more with the new LMS, Moodle.

e Study Guide Page

This is the end result, the web front end for the InDesign XML & PDFs

In terms of the web front end, it was quite easy with PHP to read the XML.  I didn’t need to do anything fancy at all, I suppose it is pretty simple XML.  In fact, I used the simpleXML php module.

By parsing in the courseID as a variable in the URL, the page loads the requested XML file

//capture courseID from URL
$courseID=$_GET["courseID"];

//load the xml that contains the info on the documents
$pathExt = ".xml";
$docInfoPath = $courseID . "/eStudyGuide/" . $courseID . $pathExt;
$docInfoXML = simplexml_load_file($docInfoPath);
$docTitles = array();

Then looping through to display the docs was easy as this!

$i = 1;

foreach ($docInfoXML->TOClev1 as $docTitles) {
	if (strlen($docTitles)!=3) {
		echo "<li>
			<a href='" . $courseID . "/eStudyGuide/" . $courseID . "_" . $i . ".pdf'>" . str_replace('    ', ":  pg", $docTitles) . "</a></li>";                            
		$i++;
	};
 };




Looking at InCopy for our Study Guides

16 12 2008

Given the current situation at the University, I want to see how we can continue to improve the process we started with our Study Guides. (earlier posts explain this process, including InDesign and it’s XML features to do various things).

I thought, I might as well look at InCopy.. So.. I’ve looked at it, and I’ve been thinking. It seems like a good tool for starters, I like the whole assignment based workflow idea where multiple authors can work on pieces of a document simultaneously. However. At this time I don’t see the value in adding InCopy to the study guide process and I’m going to abort my testing on it. Unless we significantly change things, it’s not going to impact or improve our workloads in any great beneficial way as far as I can see.

To get big gains on workflow we’d need to use InCopy completely instead of MS Word, and thus we would need to either:

ONE: get our real authors to use InCopy, our lecturers would then be more directly involved in their study material creation, but the downside is I’m sure they wouldn’t have time..? We would then take the designer role and manage the content and assignments – just like a real publishing house. OR;

TWO: get InDesign Server, develop a front end which lets authors edit their content without needing InCopy. This would take time, money, money and I don’t know what else! It’d be great, extensible, but we’d need to be careful and ensure that it met our real needs and improved our processes without getting carried away.

So, where to next? Who knows.

This is what I’d do if I had unlimited skills, time, and money from the University:

Look at MS Word’s XML docx format, investigate how we can effectively (automatically) transport this structured XML content in to InDesign, or generally just a more usable XML format than straight docx.

It’d be great to have a front end where the content could then be checked out for any needed updates – checked out by Authors or Designers – then at a certain date (or manually) the server does all the work.. TOCs, tagging, footers, PDFs for print and online, XML exports, web pages to display the content as well, the whole lot.

Hrm, wouldn’t that be nice.





Style maps behaving strangely in InDesign CS4

6 11 2008

How weird, the style mapping for importing word docs to InDesign CS4 seems to be really flaky.  

I’ve done a lot of things; originally I just plonked my old SMP files in to CS4’s word import presets directory – that didn’t work.  It picked up the smp file upon import, but when I viewed the style maps all the mapping info was simply not there.  Needless to say the mapping didn’t work in the slightest after placing the word doc.

So, attempt two; I manually re-created the style maps, saved a new preset file, and placed my word doc in.  No go again – completely ignored what I’d told it to do.

So I’m wondering, ‘maybe there’s some style map conflicts’.. So I go to place the doc in again; and see that there was only minimal conflics, say 3 conflicts, when about 15 styles didn’t map – so that didn’t add up.

I checked the presets that I’d created in attempt 2, and just like attempt one, everything I’d already entered in was gone.  Weird.

So, I re-created again, attempt number 3.  I then looked at the SMP files in dreamweaver, since they’re basically just XML.  The XML had all the info in, but still the maps didn’t work as they hadn’t in attempt 1 and 2.  I decided to replace the XML with my old XML – that didn’t work either.

I dunno what’s going on with it, but it’s got issues.. until I get to the bottom of it I’m very un-impressed.





Cell padding in InDesign

13 08 2008

We had a fair few hiccups in our overall Word to InDesign conversion recently (see previous posts regarding study guides and InDesign).  One of the problems involved table and cell styles in InDesign not applying the specified cell padding!

This was really frustrating, because even though you’d applied the table/cell styles to the tables in the document, you still had to manually add the cell padding in.  .. and yes, cell padding is entered in on the cell style specs so there’s no reason I can think of why it’d get ignored.  It is possible that the settings from Word were overriding the cell specs.. That’s probably all it was actually.

Anyway, a solution was found by trawling through the Adobe InDesign Exchange for third party scripts.  I ended up finding ‘TableStyle’, which was fantastic.  It lets you specify a whole range of table formatting, and does a selection or an entire document automatically.  All I had to do was copy the script into InDesign’s script panel directory and voila, double click on the scrip from the automation panel in InDesign and the whole document is done.

The only tweaking I did was to edit out the code which updated table borders and colours, since they interfered with our existing table styles.  That was only a quick 1 min javascript edit though.  Easy!

Overall I’m impressed by the scripting capabilities of InDesign, I’ll be looking in to what else we can do in the future to get around various problems.





Import XML into InDesign CS3

9 05 2008

The scenario:

We have 100 odd study guides, each require the creation of an overprint PDF containing course and faculty information, as well as a barcode and item number. The overprints are printed onto an already produced cover. It saves time, money and makes sense for us really.

The problem associated with that is, no one really has time to manually create 100 pages in InDesign, and copy and paste course information and barcode information from a number of sources, yuk! Even if we did have time, I don’t like the changes or stuffing up one of the barcodes, since you can’t even read what you’ve typed or pasted in.

The solution:

Pull the course, faculty and barcode information from a Database; create a simple XML file, and import into InDesign!

How the process went:

From what I’d read on the net, I assumed that when one imports XML into InDesign, all your pages are automatically created.  Maybe I missed something but I found that I had to actually create the pages manually, which isn’t really a problem as it’s only a few mouse clicks.

The next subtle thing I found which seemed to be missing from all of the instructions and tips I read on the net, was that the pages didn’t actually take on the tagged structure of their master page!  Okay, that was easy, all I had to do was tell the pages to Over-ride their master; and once I’d done that, DELETE the content of the master page (or else the imported xml goes in to the master page as well as your normal pages).

Despite everything looking perfect the XML wouldn’t import correctly; I ended up having some data missing on a page, then it’d be on the next page; basically stuff was all over the place.  

I found out, after going around in circles for ages; that when I’d told my pages to over-ride the master page – they didn’t take on the XML structure exactly as it was on the master!!!!  They all had their tags in the wrong bloody order!

So then all I did was just adjust the order of tags in my XML source, it still made sense so that was fine with me. 

Once I’d done that.. it worked perfectly!  XML in to InDesign does work, it’s just a little bit annoying sometimes!

R