Tag Archives: PaperQuik

I’m Open Sourcing Two AngularJS Projects

By far, the most successful open source thing I’ve done in years is the project I called airquotes. It was my first project built using AngularJS and I published it early on to give others a chance to see something finished which had been built using it other than a to-do list.

airquotes on Github

Since then I’ve built some other projects outside of my day job using AngularJS and though not particularly profitable they are diverse (to say the least) and I’ve decided I’d like to open source them as well to see if they can help people.

The first up is PaperQuik (PaperQuik.com). It’s an app which asks a few simple questions and then generates a printable sheet of paper (lined, dot paper, graph paper, etc.) in the browser. Unlike most sites like this, it doesn’t just have a canned set of PDF files it dispenses, nor does it have a server process building them. Instead it uses the HTML5 canvas to draw an image of the paper and then helps you print that image.

PaperQuik on Github

The second project is ClearAndDraw (ClearAndDraw.com). It’s a simple webapp that I threw together in just a few evenings because I wanted to keep track of my cards and dice for the game Marvel Dicemasters: Avengers vs. X-Men. It’s not nearly as complicated as the paper generation in PaperQuik, but it does show real time filtering using AngularJS and it stores all of the information you give it in localStorage of the user’s browser so it doesn’t forget anything they enter.

ClearAndDraw on Github

Neither of these projects has any back-end at all, they are served up strictly as a set of static HTML, CSS, JavaScript, and images and do all of their work client side. That’s not to say that I don’t want to build a back-end; ClearAndDraw.com in particular cries out for one to be added so users can enter in card/dice information and then retrieve it from any browser and any machine, rather than always having to return to the same place previous cataloging was done. But the initial solution was simple and worked as a starting point. It also presents an example of how a site might save data locally even for unregistered users and then later save that to a back-end data store if the user does create an account later.

I also took an evening and updated airquotes to the current version of AngularJS (1.2.25) and deployed it to a GitHub page so people can play with it without having to deploy it locally (like PaperQuik and ClearAndDraw).

About these ads

PaperQuik – You can try out my new project today

If you still make notes, draw things, etc. then you still need paper and I’ve got a new project you might like. It allows you to create that paper and print it right from your browser. It’s only in an alpha form at the moment (which means not all of the features are finished yet), but you can already put it to good use and print out several kinds of paper in US Letter, US Letter (landscape orientation), US Legal, A4, A4 (landscape orientation), A5 sizes.

http://www.PaperQuik.com

Here are a few examples of what it can generate today printed out on a bog standard HP printer using Chrome (which is the easiest to get a great print from on either Mac or Windows).

PaperQuik Paper Examples

So, I said it’s just in alpha, here’s what you can expect in a later beta and the final version:

  • The ability to do some configuration of the pages. For example, remove the header on the page or change the color of lines from a dark grey to other colors.
  • A new Cornell Note-taking layout. Customization of that format will be really nice because you’ll be able to mix graph paper or dot paper into a Cornell layout.
  • Double sided pages.
  • A to-do list layout.
  • Musical staves as another possible thing to put on your pages.
  • Printing instructions for Safari and IE.
  • A fix for the preview issue in IE 9, 10, and 11.

Using SVG to make custom paper (and why it didn’t work)

I’ve been wanting some specific pages of paper for the paper pad I use at work. I’ll plug the specifics features and brand I love below because I think it’s really cool, but let’s stick to the programming for the moment.

Anyway, there are lots of websites out there that will let you download many different configurations of “graph paper” for you to print out on your own printer. That seemed like what I wanted but site after site that I went to had only a big (or small) tub of PDF files from which you could pick. Sometimes they printed out well, most often not, and they really didn’t have the setups I was interested in trying (something like Cornell Notes but with different things in different areas, like dots or a blank area sometimes instead of lines).

So I had the clever idea that I would put together a simple one page website where you could pick from a few simple blocked out versions of a page (for different sizes of paper like US letter and A4 or portrait vs. landscape layout) and then put any of several different patterns in each area. Then I would generate the page using SVG in the browser and you could print out the paper and even bookmark your creation so you could come back and print it as often as you like. Sheer genius!

Except for one thing, even in 2013 when lots of browsers are claiming to have good SVG support, they kind of forgot to support printing and SVG… So you get results that look great in-browser with Chrome or Firefox and you can zoom in four or more times and still see sharp vector drawn shapes. Print out that same thing and you’ll just get a fuzzy mess, even if you choose PDF as the output target where logically the vector shapes should have just been sent straight into the PDF and zoom just as nicely as they did on screen.

Here’s an example of a dot grid that I wanted to print out to the page:

It looks a little aliased on-screen on Chrome but that didn't bother me, I don't have a Retina display on my Mac so I expected it to be a little rough at anything other than print resolution.

It looks a little aliased on-screen on Chrome but that didn’t bother me, I don’t have a Retina display on my Mac so I expected it to be a little rough at anything other than print resolution.

Here’s the same SVG dot paper zoomed in 400% on Chrome. Yup, I did it correctly. All those dots are little circles spaced out just like I wanted.

Zoomed in everything looks good! Let's print it!

Zoomed in everything looks good! Let’s print it!

Then, sadly, in my experience it matters not whether you’re printing to a real printer or to PDF, the following is typical of what actually comes out for this (zoomed in so you can see all the wonderful detail):

Wow! That's exactly nothing like what I drew. Thanks Chrome, thanks Firefox!

Wow! That’s exactly nothing like what I drew. Thanks Chrome, thanks Firefox!

I didn’t have the heart to try it in IE, I figured it would just be straight up blasphemy. And it wouldn’t matter anyway, because even if IE worked perfectly, any solution that wouldn’t work in Chrome and Firefox would be next to useless because those two browsers represent more than half (and by some estimates right around 66%) of all browsers being used today.

Oh, I did promise a plug for the nifty paper pad I use. If you’re in the United States then the Staples chain of office supply stores has a neat line of pads and paper called Arc. It’s almost identical to the Circa notebooks that Levenger carries except much less expensive.┬áIn both cases the spine of the notebooks have a set of small plastic disks onto which specially punched paper is pressed. Just the cross-section shape of the rings and the way the paper is punched is sufficient to keep the pages in place, but should you choose you can easily remove pages, add pages, or rearrange pages without the finickiness of ring binders. I love mine and I bought the special punch that Staples sells so I can use whatever paper I like in my notebook. As a result it’s a mix of blank pages, lined pages, pages for laying out iPhone apps, and even notes I printed out from Evernote. Thus my desire to generate all new forms of paper ideally suited to how I take notes and for noodling on new ideas.

Despite my inability to make this work with SVG, I’m not giving up. I’ll just have to think for a while and return to the problem. Necessity is still the mother of invention and I still need pages I can’t get on any of the downloadable paper sites I’ve been to yet.