Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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!

Edit:

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...

share|improve this question
    
Did you try with one image on your printer? I don't think raster image will print faster. –  percusse Sep 23 '13 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? –  Khaj Sep 24 '13 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 Oct 4 '13 at 6:42
2  
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 Oct 4 '13 at 7:25
    
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 Oct 4 '13 at 7:28
show 2 more comments

1 Answer

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.

printasimage

share|improve this answer
    
Thanks for solving printer problem. If Tikz has not this functionality, I will happily use your way (or any of contributors, thanks guys!) –  Khaj Oct 4 '13 at 18:32
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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