What I'm trying to do:

I have lots of software code that I need to print on a long scroll. The scroll will be no more than 440mm wide and as long as it needs to be (with a maximum of 45m). The resulting code listing is to be part of an exhibit contrasting the ‘sketching’ phase in a multidisciplinary project between design, social science, and software engineering.

What I've tried:

• Printing straight from the IDE

I cannot print straight from the development environment (Visual Studio 2012 and SQL Server Management Studio) because:

  • Both tools assume standard page sizes

  • I need to rotate the software code listing 180 degrees so that the end of the listing is at the tail of the paper roll.

• Using Photoshop

Since, I can't print from the IDE, I’m doing it in Adobe Photoshop (CS5, 64 bit, on Windows 8). My workflow for this is verging on the ridiculous:

  1. First I cut-and-paste each file from the code editor into a Microsoft Word document. If I cut-and-paste the code listings into PS/Ai I lose the formatting (for example the coloring of comments differently form variable declarations)

  2. I save the Microsoft Word document as a PDF and open that into Photoshop (to preserve the formatting)

  3. I now have 51 PSD files, each with one layer containing the text for that ‘page’. It’s rasterized layers as it is not editable as text

  4. Using Adobe Bridge I open all 51 PSD files created in step 3 and “Load Files into Photoshop Layers” so that I have a new single Photoshop file with all 51 text image layers in.

  5. The layers sit on top of each other. What I need is for them to sit head-to-toe. I don’t know how to do this without spending a million years selecting layers and moving them by hand.

  6. If I ever get Stage 5 done I will then group the 51 layers and rotate the result through 180 degrees.

  7. I will then re-size the result to have a width of 400mm and print the resulting file on our banner printer, having first calculated the resulting paper ‘height’ and turned off the automatic paper cutting.

My Questions:

  • Is there a better way of doing this?

  • I can see the Photoshop actions that will align layers by their tops, their bottoms, or their centers but how do I automatically align them so that the bottom of layer 1 touches the top of layer 2, the bottom of layer 2 touches the top of layer 3, etc.?

  • John - your Illustrator answer below looks perfect. I'll give that a go and report back. I think I can get around the Illustrator size restrictions by keeping each file separate and letting the printer run them together by not cutting the paper roll between prints.
    – dumbledad
    Sep 1, 2013 at 9:53
  • I know I'm a bit late to the party, but there's also a handy question on tex.stackexchange about a very similar problem. Jul 31, 2018 at 11:43

1 Answer 1


Using Illustrator

You're on the right track, but Photoshop is not the way to go for huge files like this. Illustrator will be able to handle text much better.

The Good News

You can import formatted text into Illustrator! (steps below)

The Bad News

You're going to run into a road block: the maximum document dimensions (in CS5 at least) is 5779.55mm. I don't know how long your banner is actually going to be, but that's about 39m shorter than your specified maximum print size.

The Steps:

So, if your code will all fit in a 5.7m document:

  1. Paste your code from the code editor into Word (as you have done previously)
  2. Save it as a Rich Text Format (RTF) document
  3. Open the RTF document in Illustrator
  4. Your text will be clipped in a shape, but you can re-size the shape as necessary

The result will be editable text in Illustrator that maintains the IDE code formatting:

result in Illustrator

Note: Illustrator can open native Word files (.doc/docx), but this gave me some weird newline issues. Your results may vary.

Using a PDF printer (maybe)

If you have Adobe Acrobat (or similar PDF printer), you should be able to print your document with a custom page size. The dialog is a little hard to get to, but it should look something like this:

Custom page size dialog

This is how I got there:

  1. FilePrint (in Visual Studio)
  2. Select Adobe PDF as the printer (from the dropdown)
  3. Click Properties
  4. From the Paper/Quality tab, click Advanced
  5. In the Paper Size dropdown, select PostScript Custom Page Size

The Good News:

You'll be able to select a very long height, up to 635 meters!

The Bad News:

Printing from Visual Studio may or may not preserve the text formatting. I only have VS2010 express, where this is not a feature. However, it might work for you in VS2012.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.