Initially, some 100 fire engines were dispatched to the Thai Development Industrial Paper Co Ltd in Tambon Thay Ban in Muang district at 8pm on Wednesday.
At first, firefighters fought the blaze from inside the compound but they had to retreat to outside the perimeter as the flames spread fast and some 50 additional fire engines were called in
Officials of the factory said the fire began when a worker, who was fixing the metal roof, caused sparks to fall on recycle paper rolls below.
At 4.30am on Thursday, the fire had swept through three warehouses at the factory.
Firefighters also used a bulldozer to separate the flames from the remaining paper rolls.
Kittipong Sakulsas, 30, a firefighter, said there were several layers of paper rolls and when they extinguished one layer, it rekindled another layer.
Although they had controlled the flames, firefighters expected it would continue to burn for several hours before it was completely extinguished.
He added that the factory was far from a water source and fire engines had to take turns to fetch water.