Aspose pdf-18.11 missing maven in repository

I use this dependency in my project:

com.aspose aspose-pdf 18.11

@Saranya_Sekar

Thanks for contacting support.

Would you please make sure to use repository settings in pom.xml as follows:

<repositories>
 <repository>
  <id>AsposeJavaAPI</id>
  <name>Aspose Java API</name>
  <url>http://artifact.aspose.com/repo/</url>
 </repository>
</repositories>`

And add dependency as:

<dependencies>
    <dependency>
        <groupId>com.aspose</groupId>
        <artifactId>aspose-pdf</artifactId>
        <version>18.11</version>
    </dependency>
</dependencies>

In case you still face any issue, please share the complete error description along with sample console application. So that we can test the scenario in our environment and address it accordingly.

@asad.ali

Thanks for the response. I am able to overcome this issue.
I am facing this error when I use this code for changing the version of the pdf.

try
{
String dataDir = UPLOADED_FOLDER + file.getOriginalFilename();
System.out.println(“dataDir::”+dataDir);

		 com.aspose.pdf.Document pdfDocument = new com.aspose.pdf.Document(dataDir);
			
			String logfile="D://VersionChangeLog.log";
			pdfDocument.convert(logfile, PdfFormat.v_1_3, ConvertErrorAction.Delete);
	                File file2 = new File(logfile);
			if(file2.delete()){
				//invoked
			}		
			pdfDocument.save(dataDir.replace(".doc",".pdf"));
			
		 
		 
	 } 

class com.aspose.pdf.exceptions.InvalidPdfFileFormatException: Incorect file format
com.aspose.pdf.internal.l9h.ld.lI(Unknown Source)
com.aspose.pdf.internal.l5n.l1l$lI.deserialize(Unknown Source)
com.aspose.pdf.internal.l9j.le.deserialize(Unknown Source)

@Saranya_Sekar

Thanks for your feedback.

It is good to know that your earlier issue has been resolved now. Regarding the issue which you are facing now, would you please share your sample PDF document with us so that we can test the scenario in our environment and address it accordingly.

I am using spring-boot as a framework for hosting the application. It is not working for any document.

@Saranya_Sekar

Thanks for further elaborations.

The exception which you have shared earlier, normally occurs when you try to load non-PDF document or any corrupt PDF document into Document constructor. Would you please make sure that you use valid PDF document to convert it into your required format as we have tested the scenario in our environment using latest version and did not experience any issue.

PDF_Not_Converted.zip (48.8 KB)
This is the document I tried to convert using spring-boot. As normal java application this image is converted to pdf.

@Saranya_Sekar

The file you shared is .docx document, not PDF. Would you please share the PDF file? Are you trying to convert .docx file into PDF using Aspose.PDF for Java?

yes … I use Spring boot application.

@Saranya_Sekar

Thanks for your response.

Please note that you cannot convert a Word (.doc/.docx) Document into PDF using Aspose.PDF API instead, we offer Aspose.Words API which serves the purpose to deal with Word Documents and convert them into other file formats. You may please use suggested API in order to get what you require and in case you still face any issue, please create a topic in Aspose.Words Forums where you will be assisted accordingly.