libs.itext7.core.v930 not open pdf file from assets #176882
Replies: 1 comment
-
| I got the answer with copilot. It does not seem possible to use libs.itext7.core.v930 with xml, it should be used libs.itext7 V7, which is deprecated, with all the risks that it generates. So I chose another solution with com.tom-roush:pdfbox-android:2.0.27.0 | 
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
General
Body
Hi,
I try to open file pdfform file from assets and fill in each field. I've not problem with old versions of itext. Now with gradle 9.2.0-rc-1, old versions are deprecated and i must to use libs.itext7.core.v930. Which this version I've in the log:
[main] INFO com.itextpdf.kernel.utils.DefaultSafeXmlParserFactory - Exception was thrown: http://apache.org/xml/features/disallow-doctype-decl. The feature http://apache.org/xml/features/disallow-doctype-decl is probably not supported by your XML processor.
[main] INFO com.itextpdf.kernel.utils.DefaultSafeXmlParserFactory - Exception was thrown: http://xml.org/sax/features/external-general-entities. The feature http://xml.org/sax/features/external-general-entities is probably not supported by your XML processor.
[main] INFO com.itextpdf.kernel.utils.DefaultSafeXmlParserFactory - Exception was thrown: http://xml.org/sax/features/external-parameter-entities. The feature http://xml.org/sax/features/external-parameter-entities is probably not supported by your XML processor.
[main] INFO com.itextpdf.kernel.utils.DefaultSafeXmlParserFactory - Exception was thrown: http://apache.org/xml/features/nonvalidating/load-external-dtd. The feature http://apache.org/xml/features/nonvalidating/load-external-dtd is probably not supported by your XML processor.
Value :java.lang.UnsupportedOperationException: This parser does not support specification "Unknown" version "0.0"
the module abort on PdfDocument pdfU7U9 = new PdfDocument(new PdfReader(src), new PdfWriter(file.toString()));
I've tried any solutions with ask gemini but the problem persists
Have you an idea to help me
Thank you very
muchtry {`buildscript {
ext.kotlin_version = '1.8.0'
repositories {
google()
mavenCentral()
maven { url = "https://jitpack.io" } // This line is crucial
maven {
url = uri("https://company/com/maven2")
}
mavenLocal()
maven {
url = "https://maven.java.net/content/groups/public/"
}
// maven {
// url = "https://repo.itextsupport.com/android"
// }
maven {
url = "https://raw.githubusercontent.com/psiegman/mvn-repo/master/releases"
}
}
}
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.compose)
}
android {
namespace = 'com.prod.gfer94'
compileSdk = 36
}
configurations {
all {
exclude group: 'xalan', module: 'xalan'
exclude group: 'xml-apis', module: 'xml-apis'
}
}
dependencies {
implementation libs.androidx.appcompat
implementation libs.material
implementation libs.androidx.constraintlayout
implementation libs.androidx.navigation.fragment
implementation libs.androidx.navigation.ui
implementation libs.firebase.functions
implementation libs.androidx.activity
implementation libs.androidx.gridlayout
implementation libs.android.mail
implementation libs.android.activation
implementation libs.firebase.core
implementation libs.firebase.database
implementation libs.firebase.messaging
implementation libs.firebase.appcheck.debug
implementation libs.firebase.appcheck.ktx
implementation libs.toasty
implementation libs.commons.io
implementation libs.gson
implementation libs.itext7.core.v930
implementation libs.kernel.v930
implementation libs.layout.v930
implementation libs.io.v930
implementation libs.material
implementation libs.androidx.recyclerview
implementation libs.firebase.crashlytics.v2001
implementation libs.com.google.firebase.firebase.analytics
implementation libs.google.firebase.crashlytics
implementation libs.google.firebase.analytics
implementation libs.mpandroidchart
implementation libs.joda.time
implementation libs.slf4j.api
implementation libs.slf4j.simple
implementation libs.bcpkix.jdk18on
implementation libs.bcprov.jdk18on
implementation libs.androidpdfviewer
implementation libs.androidx.activity.compose.v1110
implementation libs.android.pdf.viewer.v320beta1
}
apply plugin: 'com.google.gms.google-services'
// Apply the Crashlytics Gradle plugin
apply plugin: 'com.google.firebase.crashlytics'
`
Beta Was this translation helpful? Give feedback.
All reactions