Nivel 1
Nivel 2
Iniciar sesión en la comunidad
Iniciar sesión para ver todas las insignias
Hi all,
I'm trying to use Apache PDFBox for a workflow step (version 3.0.1) and the maven build runs in my local. However I see that my bundle fails to install and the org.apache.pdfbox cannot resolve in the AEM author.
¡Resuelto! Ir a solución.
Vistas
Respuestas
Total de me gusta
To get this working, I used version 5.5.13 of IText Core on our AEM author and included it in both my parent pom and core pom.
<!-- iTextPDF -->
<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>itextpdf</artifactId>
<version>5.5.13</version>
</dependency>
https://mvnrepository.com/artifact/com.itextpdf/itextpdf/5.5.13.3
Vistas
Respuestas
Total de me gusta
can you please provide you pom.xml entry for pdfbox
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox</artifactId>
<version>3.0.1</version>
<scope>compile</scope>
</dependency>
or you can try embed explicitly to the maven-bundle-plugin
<Embed-Dependency>
pdfbox;scope=compile|runtime
</Embed-Dependency>
Vistas
Respuestas
Total de me gusta
Here's my entry for pdfbox in the pom:
<!-- Apache PDF Box -->
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox</artifactId>
<version>3.0.1</version>
<scope>compile</scope>
</dependency>
Vistas
Respuestas
Total de me gusta
Hi @stiegjo22
AEM works with very lower versions of PDFBOX only. Might be this the limitation while you are working in AEM, so keep these things in mind.
Vistas
Respuestas
Total de me gusta
I went down to version 2.0.9 and it still failed. Does anyone know what is the lowest version that works with AEM? Thanks.
Vistas
Respuestas
Total de me gusta
try 1.8.0 below
in some threads, it worked with 1.6.0
Vistas
Respuestas
Total de me gusta
I tried with lower versions of PDFBOX - 1.8.0 and 1.6.0. Both show the same error message after running a maven build and deploying to AEM author 6.5.18.
Vistas
Respuestas
Total de me gusta
Do you see pdfbox as part of your /system/cobsole/bundles...
if not, can you please download jar and try uploading one manually just for quick verification or download in local have this as part of code and upload as external jar through code.
Vistas
Respuestas
Total de me gusta
Hi @stiegjo22
Please check the correct dependency using dependency finder.
http://localhost:4502/system/console/depfinder
If dependency does not exists then you need to installed the pdfbox bundle in AEM, using embedded; Example
Also In your POM you added dependency scope as compile, thats means dependency will only be available for compile time.
Vistas
Respuestas
Total de me gusta
Now I'm trying to use a different PDF library - https://mvnrepository.com/artifact/com.itextpdf/kernel
I've added the Maven Bundle Plugin to my project's pom.xml file and specified instructions such as Export-Package.
<!-- Maven Bundle Plugin -->
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>4.1.0</version>
<extensions>true</extensions>
<configuration>
<instructions>
<Import-Package>
com.itextpdf.kernel.*;version="[8.0,9)",
com.itextpdf.io.*;version="[8.0,9)", *
</Import-Package>
<Export-Package>
com.itextpdf.bundle;version="1.0.0"
</Export-Package>
<Embed-Dependency>
itext.kernel;version="[8.0,9)",scope=compile|runtime
</Embed-Dependency>
<Embed-Transitive>true</Embed-Transitive>
<Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
<Bundle-Version>${project.version}</Bundle-Version>
</instructions>
</configuration>
</plugin>
However I can't find the com.itextpdf.bundle in the 'Target" directory after running maven clean install.
Vistas
Respuestas
Total de me gusta
did you add itextpdf kernel dependency ?
Vistas
Respuestas
Total de me gusta
<!-- iText Kernal -->
<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>kernel</artifactId>
<version>8.0.3</version>
</dependency>
Vistas
Respuestas
Total de me gusta
is it downloading the dependencies ?
try (force) mvn clean install
check your .m2 folder for the libraries (settings.xml)
Vistas
Respuestas
Total de me gusta
To get this working, I used version 5.5.13 of IText Core on our AEM author and included it in both my parent pom and core pom.
<!-- iTextPDF -->
<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>itextpdf</artifactId>
<version>5.5.13</version>
</dependency>
https://mvnrepository.com/artifact/com.itextpdf/itextpdf/5.5.13.3
Vistas
Respuestas
Total de me gusta
Vistas
me gusta
Respuestas
Vistas
me gusta
Respuestas
Vistas
me gusta
Respuestas
Vistas
me gusta
Respuestas