Trstenjak was born in the village of Kraljevci near Sveti Jurij ob Ščavnici, in what was then the Austrian Duchy of Styria (now in Slovenia). He attended the elementary school in his home village and later in Bad Radkersburg (Slovene: Radgona) where he met the philologist Peter Dajnko, with whom he established a close friendship. He studied at the lyceum in Maribor and later in Graz, where he became a supporter of the Illyrian movement, a Romantic nationalist cultural movement that spread from the neighbouring Croatia, and which advocated a cultural and linguistic unification of the South Slavic peoples.
After graduating from theology, he was ordained in 1844, then he served as a chaplain in the Lower Styrian villages in Slivnica pri Mariboru (1844–46), Ljutomer (1847), Hajdina (1848), and the town of Ptuj (1849–50). From 1850 until 1861, he was a chaplain and then a catechist in Maribor. From 1861 until 1868, he was the parish priest in Šentjur, then from 1868 until 1879 in Ponikva, and from 1879 until his death in Stari Trg near Slovenj Gradec.
Philology and history work
Trstenjak collaborated closely with the Slovene-Croatian poet and ethnologist Stanko Vraz. Influenced by the theories of Jan Kollar and Pavel Jozef Šafařik, two influential Czech philologists who advocated Pan-Slavic ideals, Trstenjak wrote several historical books, in which he claimed that the Slavs were the most ancient people in Europe (an antecedent of the Venetic theory). However, he gave up these claims after he found they were scientifically untenable.
National awakening work
During the Spring of Nations in 1848, Trstenjak became an enthusiast supporter of the United Slovenia program. As a close collaborator of Matija Majar, the author of the program, Trstenjak helped in raising signatures for the establishment of a unified political entity comprising all Slovenian ethnic territory. After 1849, he established contacts with Janez Bleiweis and Lovro Toman who became the leaders of the Slovene National Movement in the 1850s and early 1860s. In 1863, he was among the co-founders of the prestigious publishing house and scientific society Slovenska matica. He was also a collaborator of the bishop Anton Martin Slomšek. In 1877, upon his initiative, a marble plaque to Slomšek was unveiled on his birth house in Uniše.
Trstenjak was also a writer and poet. He wrote in a typically Romantic manner, following the example of France Prešeren and Josipina Turnograjska. He rejected the literary realism of the younger generations of Slovene authors who entered the scene in the mid-1860s: he strongly polemicised against Fran Levstik and rejected the poetry of Simon Gregorčič and Josip Stritar, as well as the circle around the literary journal Ljubljanski zvon. In 1878, he was elected the first president of the Slovene Writers' Association.
- Kdo so bili Ambidravi, in kdo je sozidal starodavni mesti Virunum in Teurnia Kelti ali Venedi? V Celovcu : J. Leon, 1853
- Mesec Marije, ali častenje presvete device Marije skoz eden celi mesec s vsakdanjimi premišljevanji, molitvami in izgledi iz živlenja svetnikov, ter z molitvami v jutro, večer, pri sv. maši, za spoved ino sv. obhajilo, kak tudi s kratkim opisom naj imenitnejših Marijinih svetstev, katere slovenski romarji obiskavajo. U Gradcu: J. Sirolla, 1856
- Pannonica: spomeniški listi. Samozal. D. Trstenjak, 1887
- Weriand de Graz: zgodovinsko-rodoslovna razprava. V Celovci : pisatelj, 1884
- Triglav, mythologično raziskavanje. Samozal. D. Trstenjak, 1870
- Slovanščina v romanščini. [Ponikva]: pisatelj, 1878