Quantcast
Channel: Aspose.Pdf Product Family
Viewing all articles
Browse latest Browse all 3131

PDF to Doc not working properly

$
0
0
public static void main(String[] args) 
    {
        try
        {
            Document doc = new Document("FakePath\\Delivery.pdf");
            doc.save("E:\\a.doc",SaveFormat.Doc);
        }
        catch(Exception e)
        {
            e.printStackTrace();
        }
    }

This is my code where I want to convert pdf file to doc file
Its converting to doc but with no. of errors which you can see in a.doc which is attached in attachment.

And if I convert pdf to docx format its giving me exception
And error is

class com.aspose.pdf.internal.hv.h: Specified argument was out of the range of valid values.
com.aspose.pdf.ADocument.saveInternal(Unknown Source)
com.aspose.pdf.Document.saveInternal(Unknown Source)
com.aspose.pdf.ADocument.save(Unknown Source)
com.aspose.pdf.Document.save(Unknown Source)
just.Just.main(Just.java:24)
at com.aspose.pdf.ADocument.saveInternal(Unknown Source)
at com.aspose.pdf.Document.saveInternal(Unknown Source)
at com.aspose.pdf.ADocument.save(Unknown Source)
at com.aspose.pdf.Document.save(Unknown Source)
at just.Just.main(Just.java:24)



and in code line no 24 is doc.save("E:\\a.doc",SaveFormat.Doc);

Please help me

Viewing all articles
Browse latest Browse all 3131

Trending Articles