Solidarity, Poland's independent trade union federation, threatened tonight to close every newspaper in the country, including the official Communist Party daily, for two days this week to protest what it termed a continuing antiunion campaign by communist authorities.

In announcing a nationwide strike by printers for Wednesday and Thursday, Solidarity asserted that where it cannot prevent the actual printing, it will attempt to block distribution of newspapers.

The move is the first major test of wills between the government and unions since the extraordinary Polish Communist Party congress last month. It also appears to threaten a wider conflict should the union actually attempt to prevent distribution of papers.

A Solidarity spokesman left open the possibility that the walkout could be canceled if the government abandons its propaganda campaign and grants the union greater access to the media. He added, however, that he saw "little chance" of this.

"There have been no negotiations, and propaganda is still as strong as ever," he said.

The government had no immediate response. In recent weeks, it has been increasingly assertive in dealing with the unions, and Saturday it prevented a Solidarity branch from publishing its magazine by seizing the printing equipment on charges of "anti-Soviet slander."

Tonight, Solidarity called on Poles not to buy any newspapers Wednesday and Thursday if the authorities put some out.

The strike call was issued after a meeting between Solidarity leaders and officials of Solidarity's printers union chapter. The printers union said the strike was necessary because of numerous instances of "slandering our union in the mass media."

A meeting of Solidarity leaders is scheduled for Tuesday in the coal mining center of Katowice, presumably to coordinate strike strategy.

The strike threat follows a series of conciliatory moves by Solidarity last week that included calls for a halt to demonstrations protesting food shortages. The unions also withdrew support from a major demonstration to demand the release of political prisoners.

After Poland's influential Roman Catholic hierarchy also urged that the march on behalf of political prisoners be called off, its organizers abandoned plans to converge on Warsaw today from five cities.

This march, which the government had pledged to prevent by all means at its disposal, was scheduled to coincide with the resumption today of court proceedings against four members of the Confederation for Independent Poland.

The four, including confederation leader Leszek Moczulski, are charged with plotting to overthrow the state. The proceedings on their motion to be released from jail adjourned without a decision.

The unions' move last week appeared to have been designed to shift spontaneous outbursts of public grievances away from the streets to more manageable and better organized efforts.

The government, meanwhile, has been increasingly critical of Solidarity and has accused the union movement of efforts to paralyze the economy and harm Poland's relations with its Warsaw Pact allies.