Regarding External Dependencies | Community
Skip to main content
Adobe Employee
November 3, 2023

Regarding External Dependencies

  • November 3, 2023
  • 2 replies
  • 1468 views

Hi, I want to import following things on my servlet. Can anyone let me know what is the process to add external dependencies and also what external dependencies are needed?

import org.xhtmlrenderer.pdf.ITextRenderer;
import com.lowagie.text.DocumentException;
import com.lowagie.text.pdf.BaseFont;
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

aanchal-sikka
Community Advisor
Community Advisor
November 3, 2023

Hello @sakethchandra02 

 

Dependencies would be 

<!-- https://mvnrepository.com/artifact/org.xhtmlrenderer/flying-saucer-pdf-itext5 -->
<dependency>
<groupId>org.xhtmlrenderer</groupId>
<artifactId>flying-saucer-pdf-itext5</artifactId>
<version>9.0.1</version>
</dependency>

 

<!-- https://mvnrepository.com/artifact/com.lowagie/itext -->
<dependency>
<groupId>com.lowagie</groupId>
<artifactId>itext</artifactId>
<version>2.1.7</version>
</dependency>

 

To use these dependencies, you can add the bundles in parent's pom.xml and all modules's pom.xml, like described on https://techrevel.blog/2023/09/27/managing-third-party-dependencies-in-aem/. Just refer to following:

 

Aanchal Sikka
Adobe Employee
November 3, 2023

Thanks a lot for the response. My core bundle is now stuck in installed state with the following error

I have added them as dependencies in core pom as well (As I was getting an error while build). Now the build is successful but core isn't getting active. Can you please let me know if there is anything missing here?

aanchal-sikka
Community Advisor
Community Advisor
November 3, 2023

<!-- https://mvnrepository.com/artifact/org.xhtmlrenderer/flying-saucer-core -->
<dependency>
<groupId>org.xhtmlrenderer</groupId>
<artifactId>flying-saucer-core</artifactId>
<version>9.3.1</version>
</dependency>

 

<dependency>
<groupId>org.xhtmlrenderer</groupId>
<artifactId>flying-saucer-pdf-itext5</artifactId>
<version>9.3.1</version>
</dependency>

 

 

Updated version of earlier dependency

Aanchal Sikka
kautuk_sahni
Community Manager
Community Manager
November 6, 2023

@sakethchandra02 Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.

Kautuk Sahni