Ben Kilb for The New York Times

Faber-Castell has manufactured hundreds of millions of pencils since 1761. Here, the flagship factory in Stein, Germany.

It is not a petty fit of pique by a mad Bavarian aristocrat. The 72-year-old count, the eighth in a long line of pencil makers, just wants to prove how durable the pencils that carry his family name are.

The Faber-Castell family has been making wooden pencils by the hundreds of millions here in a storybook setting, bisected by the swift Rednitz River, which was once the main source of power here. A torrent of brightly colored pencils flows from clattering machines in a century-old factory with a tile roof and windows framed in pastel hues.

Faber-Castell is the largest maker of wood-encased pencils in the world and also makes a broad range of pens, crayons and art and drawing supplies as well as accessories like erasers and sharpeners. About half the company’s German production is exported, mostly to other countries in the euro zone. That means that Faber-Castell contributes, at least in a small way, to Germany’s large and controversial trade surplus — which now rivals China’s for the world’s largest.

Faber-Castell illustrates how midsize companies — which account for about 60 percent of the country’s jobs — are able to stay competitive in the global marketplace. It has focused on design and engineering, developed a knack for turning everyday products into luxury goods, and stuck to a conviction that it still makes sense to keep some production in Germany.

“Why do we manufacture in Germany?” the count asked during an interview at the family castle near the factory. “Two reasons: One, to really make the best here in Germany and to keep the know-how in Germany. I don’t like to give the know-how for my best pencils away to China, for example.

“Second, ‘Made in Germany’ still is important.”

Not all its factories are in Germany. But when Faber-Castell, which is privately held and had sales of 590 million euros, or about $800 million, in its last fiscal year, manufactures in places like Indonesia and Brazil, it is at its own factories.

In contrast to many American companies, like Apple, that have outsourced nearly all production to Asia, Faber-Castell and many other German companies make a point of keeping a critical mass of manufacturing in Germany. They see it as central to preserving the link between design, engineering and the factory floor.

The result is a large trade surplus. During the first nine months of the year, Germany exported goods and services worth €148 billion more than it imported — including a surplus of €20 billion in September alone. In absolute terms, it was the largest monthly trade surplus on record.

Germany’s trade surplus is so huge that it has drawn criticism from the United States. The European Commission is conducting an extensive review of whether it is unhealthy for the euro zone economy. Critics say Germany should invest more of the profits from exports at home, to stimulate its own economy and, by extension, the rest of the euro zone.

But companies like Faber-Castell are more concerned about their ability to stay globally competitive, leaving the macroeconomics of trade to the bureaucrats of Brussels and Berlin.

There are threats everywhere, including ever-more-sophisticated Chinese competitors, the stagnant euro zone economy and unpredictable shifts in technology. And when even preschool children know how to operate iPads, there is no certainty of a future for colored pencils and ink markers.

“The biggest challenge for Faber-Castell will be how writing will develop with the advent of digital technology,” said Hermann Simon, a management consultant who coined the term “hidden champions” to describe the highly focused, midsize companies like Faber-Castell that drive the German economy. “Will children still write? But Faber-Castell recognizes this challenge.”

(Page 2 of 2)

Certainly, the current market is testing Faber-Castell. While sales in the last fiscal year rose 3.5 percent, profit declined 27 percent, to €24.2 million, in part because of the cost of building new operations in Asia and Latin America. The company said last month that sales so far this fiscal year were down 9 percent, because of the depreciation of currencies in markets like Brazil and weak sales in southern Europe.

Ben Kilb for The New York Times

Still, Faber-Castell, founded in 1761 when graphite pencils were a novelty, has overcome technological shifts before. When Count Anton took over the business in 1978, after the death of his father, Count Roland von Faber-Castell, the company was a leading maker of slide rules. That was soon laid to waste by the electronic calculator. Then, in the 1980s, the advent of computer-assisted design soon gutted the market for its mechanical drawing products.

Count Anton had been working happily as an investment banker at Credit Suisse First Boston when his father died unexpectedly. He was not thrilled to assume the family throne. “I wasn’t interested in pencils,” he said.

To his surprise, he enjoyed the business, particularly the marketing end. And he felt a responsibility to preserve the family legacy, a typical characteristic of German companies. “I consider what I got from my father as a kind of fiduciary property, which in a way does not belong to me,” said the count, who owns all but a small percentage of Faber-Castell.

With help from the Boston Consulting Group and the company’s in-house designers, the count revamped the product line to put more emphasis on higher-priced products, ranging from colored pencils for artists to fountain pens selling for thousands of dollars. Premium products account for about 10 percent of sales.

“You have to continuously shift,” said Count Anton, who on this day wore a double-breasted pinstriped suit with red tie and white pocket handkerchief. “If you lean back and say, ‘With my products I can be happy,’ then it’s the first step to hell.”

While the basic design of a pencil has not changed much in 400 years, Faber-Castell has managed to find ways to be unique. For example, in the late 1990s, it developed a triangular pencil with raised dots that make it easier to hold. That proved popular.

Innovations include the use of water-based coatings to make pencils more environmentally friendly, as well as nontoxic to compulsive pencil chewers. To demonstrate the harmlessness of the ink Faber-Castell uses in children’s markers, Count Anton drank a glassful on camera this year.

The count’s pedigree sets him apart from the typical factory bosses. But being an aristocrat in Germany no longer means much, at least not officially. The nobility lost its privileges after World War I, and most of Germany’s remaining princes and barons have to work for a living.

Faber-Castell was founded by Kasper Faber, a carpenter’s apprentice. His great-grandson Lothar Faber was given noble status in 1861 by King Maximilian II of Bavaria after building the company into the world’s dominant pencil maker. Later generations intermarried with the aristocratic Castell clan, creating the Faber-Castell name. (Eberhard Faber pencils, recognized by generations of American schoolchildren, were made by Lothar’s younger brother, who first set up shop in Brooklyn.)

And yet, being a count still counts for something. The company’s luxury products are called the Graf von Faber-Castell line — “graf” being German for “count.” The company recently unveiled a Graf von Faber-Castell fountain pen made of jasper, quartz and gold. It sells for almost $10,000.

Even boxes of the highest-quality Faber-Castell colored pencils and artists’ markers can easily cost hundreds of dollars. It is this focus on the premium end of the market that has enabled German companies to survive in markets flooded by low-cost Asian alternatives. Mercedes and Audi cars are good examples of this, but German companies have also achieved similar success with more mundane products like Rösle kitchen implements, Steiff stuffed animals and Falke socks.

“The higher end of the market still cares about and is still ready and willing to pay a premium for good-quality products,” said Daniel Berch, a director at the market research firm Pell Research who has studied the pencil industry in the United States.

Count Anton, while aware of the digital threat, maintains that writing by hand will never disappear. People still use pens, pencils and highlighters for personal notes and to mark up printed documents, he argues. And even in wealthy countries, he says, children use pencils and pens to learn how to develop the motor skills needed to read and write.

“The pencil is in some way a very archaic product but still indispensable,” he said. “The pencil will remain alive much longer than we probably believe.”

To make sure that remains true in the next generation, Count Anton’s 33-year-old son, Count Charles von Faber-Castell, a graduate of Columbia Business School, recently joined the Faber-Castell marketing department.