Installing iText PDF in AEM 6.5.18 | Adobe Higher Education
Skip to main content
stiegjo22
Level 4
March 5, 2024
Respondido

Installing iText PDF in AEM 6.5.18

  • March 5, 2024
  • 2 respostas
  • 1353 Visualizações

I've added the following to my pom.xml, however it's not getting deployed to my local instance of AEM author. 

 

<!-- iTextPDF --> <dependency> <groupId>com.itextpdf</groupId> <artifactId>itextpdf</artifactId> <version>5.5.13.3</version> <scope>provided</scope> </dependency>

 

 

I have to manually install the jar file in bundles for it to work. Is there another workaround? Thanks.

 

 

Este tópico foi fechado para respostas.
Melhor resposta por AMANATH_ULLAH

@stiegjo22 

Try creating new module similar to core in your maven project and include dependencies in it.

Here we need to create an OSGi bundle out of third party non-osgi dependency using maven-bundle-plugin

After deploying you will see a new bundle called commons.core

Below article mentions all the steps for it

https://myaemlearnings.blogspot.com/2021/08/embedding-third-party-dependencyosgi.html

2 Respostas

AMANATH_ULLAH
Community Advisor
Community Advisor
March 6, 2024

@stiegjo22 

Try creating new module similar to core in your maven project and include dependencies in it.

Here we need to create an OSGi bundle out of third party non-osgi dependency using maven-bundle-plugin

After deploying you will see a new bundle called commons.core

Below article mentions all the steps for it

https://myaemlearnings.blogspot.com/2021/08/embedding-third-party-dependencyosgi.html

Amanath Ullah
Level 4
March 6, 2024

Hi @stiegjo22 

 

If you want to include the itextpdf library in your bundle automatically, remove the <scope>provided</scope> bit so that itextpdf gets embedded into your bundle when you build the project. Like below:

 

<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>itextpdf</artifactId>
<version>5.5.13.3</version>
</dependency>

 

Also, examine the Import-Package configuration in your Maven Bundle plugin configuration. If the com.itextpdf packages are set to version="[0,1)", then it will try to resolve the iText packages from AEM rather than embedding them.

 

Thanks,

Venkat