Export file as a pdf format using itext lib is not working

Hi guy’s i am facing problem to generate pdf file using itext lib. but while adding itext lib in pom.xml plugin works fine after import required package in my class after re running the plugin will get disabled.

dependency are:

	<dependency>
	    <groupId>com.itextpdf</groupId>
	    <artifactId>itextpdf</artifactId>
	    <version>5.0.6</version>
		<scope>provided</scope>
	</dependency> 

.
.
.
and Import-Package
org.bouncycastle.cms.*;resolution:=“optional”

i don’t what mistake did, and in class i importer all itext package to generate padf file.
am ising jira 8.1.0 in development machine.
.
.
example.class

import com.itextpdf.text.BaseColor;
import com.itextpdf.text.Document;
import com.itextpdf.text.Font;
import com.itextpdf.text.Phrase;
import com.itextpdf.text.pdf.PdfPCell;
import com.itextpdf.text.pdf.PdfPTable;
import com.itextpdf.text.pdf.PdfWriter;
.
.
.
if possible can you please share sample code.
Thanks in advance.

I’m not sure itextpdf is provided by Jira.

Could you delete <scope>provided</scope> and try again?

Hi @sven.schatter Thanks for quick reply.
i have removed <scope>provided</scope> and re-run my plugin but still its gone disabled mode.

Did you also rebuild your app before trying again?

Just to clarify, to me it looks like the problem is that by specifying <scope>provided</scope> you tell Jira to provide your app with the itextpdf dependency at runtime. But Jira doesn’t know itextpdf so it fails. If you now remove the line maven will bundle the dependency in your JAR and it should work.

So, just to be sure, after you have removed <scope>provided</scope> you should:

  • Uninstall your app.
  • Run atlas-mvn clean or manually delete your target directory.
  • Rebuild your app and reupload it to Jira.

If it then still doesn’t work there might be other errors as well and you should check the atlassian-jira.log file to see what is going on.

Hi @sven.schatter i clean the project and rebuild it but still am facing same problem.
i have build .OBR file also and uploaded in my local instace but plugin not installed it showing check log.

we can use confluence libraries li how jira allowing us to export page.
could you please suggest is ther anyway we can develop?

Thanks in advanch.