PDF-файл, созданный с использованием itextpdf и Spring Boot 3.2.0, становится недействительным после загрузки, но работа ⇐ JAVA
PDF-файл, созданный с использованием itextpdf и Spring Boot 3.2.0, становится недействительным после загрузки, но работа
After migrating from SB2.5 to SB3.2 PDF generated using itext7-core:7.2.2 becomes invalid after download but it is working fine in SB2.5.
In SB3.2, I am able to view the pdf in browser and there is no issues with its content but when I download the pdf its coming without any extention and even if i download the file and give the extention manually and open using Adobe reader it gives an error ""Adobe Reader could not open xxx.pdf because it is either not a supported file type or because the file has been damaged"
The main changes I made for the migration(SB2.5>sb3.2) in the class where pdf creation code exists is replacing javax to jakarta, mainly javax.servlet.http.HttpServletResponse to jakarta.servlet.http.HttpServletResponse
I dont think there is any issue with the pdf generation code(how i am using itext library) because it is working in SB2.5.
If anyone has worked on this/ faced this issue and remediated please let me know.
Источник: https://stackoverflow.com/questions/781 ... er-downloa
After migrating from SB2.5 to SB3.2 PDF generated using itext7-core:7.2.2 becomes invalid after download but it is working fine in SB2.5.
In SB3.2, I am able to view the pdf in browser and there is no issues with its content but when I download the pdf its coming without any extention and even if i download the file and give the extention manually and open using Adobe reader it gives an error ""Adobe Reader could not open xxx.pdf because it is either not a supported file type or because the file has been damaged"
The main changes I made for the migration(SB2.5>sb3.2) in the class where pdf creation code exists is replacing javax to jakarta, mainly javax.servlet.http.HttpServletResponse to jakarta.servlet.http.HttpServletResponse
I dont think there is any issue with the pdf generation code(how i am using itext library) because it is working in SB2.5.
If anyone has worked on this/ faced this issue and remediated please let me know.
Источник: https://stackoverflow.com/questions/781 ... er-downloa
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение
-
-
Есть ли способ показать общее количество страниц в заголовке PDF, используя itextpdf в Java?
Anonymous » » в форуме JAVA - 0 Ответы
- 74 Просмотры
-
Последнее сообщение Anonymous
-