Free Support Forum - groupdocs.com

Convert documents from Web URL to PDF


#1

HI,

We have a requirement where we want to convert documents from Web URL to pdf. Do the groupdocs API support this functionality? If so, help me navigate to the required source code. Also, does groupdocs support aspx to pdf conversion?


This Topic is created by atirtahir3 using Email to Topic tool.


#2

@adnanshubedar,

Can you please tell, what is your development platform (.NET or Java)? We’ll then guide you accordingly.


#3

Development Platform is Java


#4

@adnanshubedar,

You can convert a document available at a URL/URI to PDF. Please see this documentation. Let us know if you face any issue.


#5

@atirtahir3 ,

I tried executing the code that you have mentioned. It doesn’t seem to work for me. Firstly, HtmlSaveOptions is striked out saying it is deprecated. Secondly, I am providing SharePoint Online web url and I get a error saying “Web Resource Not found


#6

@adnanshubedar,

Can you please share that URL with us?


#7

Yes. I tried other web url as well. Following are the URL’s
http://www.safalniveshak.com/wp-content/uploads/2017/10/Safal-Niveshak-Stock-Analysis-Excel-Version-3.0.xlsx

https://targetonline.sharepoint.com/sites/ECCServices/TestRC/Document.docx


#8

@adnanshubedar,

This issue is reproduced at our end. Hence, it has been logged in our internal issue tracking system with ID: CONVERSIONJAVA-816. We are now investigating this. As there is any further update, you’ll be notified.


#9

@atirtahir3,

Any clue by when can we hear on this? We want to implement this functionality in a week or so. Was this working before and has issues now or is this newly introduced?


#10

@adnanshubedar,

Loading a document from a URL is a supported feature and this issue is raised in version 19.10.
Your issue is in queue. Please note that all issues are served on first come first served basis. We’ll surely let you know as there is any update.


#11

@adnanshubedar,

Please use this build/Jar and let us know if issue persists. Given below is the code to convert a URL to PDF:

ConversionConfig conversionConfig = new ConversionConfig();
ConversionHandler conversionHandler = new ConversionHandler(conversionConfig);
String guid = "http://www.safalniveshak.com/wp-content/uploads/2017/10/Safal-Niveshak-Stock-Analysis-Excel-Version-3.0.xlsx";
ConvertedDocument convertedDocumentPath = conversionHandler.convert(guid, new PdfSaveOptions());
convertedDocumentPath.save("Safal-Niveshak-Stock-Analysis-Excel-Version-3.0." + convertedDocumentPath.getFileType());

Looking forward to your feedback.