I am using MikTeX and Tikz package to generate images (playing cards on A4 paper). The result is nice, but slow (too many vector objects, printing is hell slow).

Is there a way to directly tell TeX "I want everything else than text to be rasterized before creating PDF? You shoud use this ... DPI. Yes, the result would be great in file size, I want it that way." It would be great if I could do that on per-tikz picture object basis (Rasterize everything in this tikz clipping/bounding box).

Is there a way to do it without external programs like ImageMagick?



Thanks for all the contributions

  • usepackage outline used drawing the text multiple times last time I checked.
  • Thanks for externalize, I am just now studying it.
  • Yes, I want to have only specific portions of the document rasterized! Like telling Tikz, I want to rasterize these drawing commands from here to here and result saved on a canvas loaded just here in the page. And now draw some text over it for me please. Rasterizing the whole document seems like an overkill to me (and it can't be done with TeX commands, sniff!)

MWE here - http://pastebin.com/ehZxD73P. It is a bit messy, because I wanted to make a code for drawing playing cards. Cards produced by the command "cardstats" are nice, but put 9 of them on one page and the printer will need a loong time to do it. If I could rasterize the problematic portions (only), it will be great!

Second great use would be, that specifying big images as backgrounds for cards, it could automatically rasterize them in lower resolution and not storing them in original resolution.

Well, maybe I want to have something that was not yet implemented...

  • Did you try with one image on your printer? I don't think raster image will print faster.
    – percusse
    Commented Sep 23, 2013 at 16:15
  • It is not printer issue. Tested on my printer, printer in PC lab and printer in photo lab. Raster images will print faster, because the desired effect will be just like printing photos with text on them (instead hundrets of vectors). The rasterization phase is slow. Please, what makes you think, that printing raster images will be slow too?
    – Holi
    Commented Sep 24, 2013 at 6:23
  • Re "the standard way to produce outline is to draw the text multiple times": It's not, you can get "proper" outlines using \usepackage[outline]{contour}: tex.stackexchange.com/questions/18472/tikz-halo-around-text
    – Jake
    Commented Oct 4, 2013 at 6:42
  • 3
    This is possible using the externalize library. Take a look at this answer, which could get you started. You may need to employ other converter settings, but the infrastructure should work fine.
    – Daniel
    Commented Oct 4, 2013 at 7:25
  • 1
    As a side comment: How do you actually print your images? In my experience, PS under Linux can be terribly slow, while printing them with AR on Windows to a PCL printer might already solve the performance issue.
    – Daniel
    Commented Oct 4, 2013 at 7:28

1 Answer 1


I recognize that this doesn't answer your question regarding TikZ (which is a very good question), but it can solve your printer problem. Also, I had to put this as an answer to upload a screenshot.

Some printer drivers and PDF viewers (notably Acrobat) allows to force "print as image". That is, the page is converted to raster in the local computer on the fly and sent to the printer. Supposedly this is a feature to avoid some problem with complicated vector graphic instructions that may hang the printer, but in your case it can help for speed.

Note: the quality of printing can degrade somewhat.


  • 1
    Thanks for solving printer problem. If Tikz has not this functionality, I will happily use your way (or any of contributors, thanks guys!)
    – Holi
    Commented Oct 4, 2013 at 18:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .