Free Support Forum - aspose.cloud

How use Methods to create PDFs

Hello,

I have installed Aspose Cloud SDKs in our Cloud OUTSYSTEMS.
here all methods or Functions are called as Actions.
So I need to know Which method or Function used for which purpose??
Please let me know if you have any Documentation related to Aspose Cloud SDKs.I am not able to understand this from Aspose Cloud Documentation.

For Example I want to Print PDF or Create PDF of Current page on Click Event,what should be Code for that i need to Know.


Please help me to understand.

Thanks,

Jigs Mehta.

Hi Jigs,


Thanks for contacting support and sorry for the delayed response.

Please follow the steps specified over following link for details on

Thanks for your Reply.


I read all things which you describe in your Links.
I tried to implement these methods But I am getting an error.
Error is: "Unable to cast object of type ‘System.Byte[]’ to type ‘Aspose.Cloud.Pdf.Document’."

For Example:
I tried with DocumentGetDocument. I passed one binaryfile as an Object to the This_Document Variable (Data type is an Object).

I am getting same error when i am passing object to that This_Document.

that is the reason that I need the Description of All methods which are used to create PDFs or editing them as well.

So i can easily implement it into my new system(OUTSYSTEMS).


NOTE: Needed Just Description,because i don’t have option to use the code directly into my new system(OUTSYSTEMS).

Thanks
Jigs Mehta

Hi Jigs,


Can you please share your complete code so that we can test the scenario in our environment and try figuring out the reasons of this problem. Before sharing the code, please remove appSID and appKey.

Furthermore, as per your requirement for convert Current web page to PDF format, please try using Aspose.Words for Cloud and follow the instructions specified over Convert Word to Images, Multipage TIFF, HTML, PDF and other File Format using Cloud Storage. Please note that you need to provide HTML as input file.

We are sorry for your inconvenience.

Thanks for Reply,

Here i have attached DLLs which we are using into Our New system(OUTSYSTEMS).
Please check it once and Reply us ASAP. So we can continue with our Development because it is taking too much time to understand.

Thanks,
Jigs Mehta.

Hi Jigs


Thanks for sharing the details. We are looking into it and will get back to you soon.

Best Regards,

Hi Jigs,


Thanks for sharing the resource files.

We have further looked into your query and have observed the sample project which you have shared only contains our .NET SDK. I am afraid I cannot see the code snippet which shows the implementation of our SDK (how you have implemented our methods). The problem might be occurring in implementation approach.

Hello,

I also want to know how can I pass the SID into this.
I am not getting any logic to Pass SID into it.


So Please let me know where i can find it.


Thanks.

Jigs Mehta.

Hi Jigs,


Please take a look over following code snippet for conversion of HTML file to PDF format. Note that you need to pass the values for Base URI, AppKey and AppSID.

//specify
product URI
<o:p></o:p>

Product.BaseProductUri = "http://api.aspose.com/v1.1";

//sepcify App SID

AsposeApp.AppSID = "xxxxxxxxxxxxxxxxxxxxxxxxx";

//sepcify App Key

AsposeApp.AppKey = "xxxxxxxxxxxxxxxxxxxxxxxxx";

//create Document object

Aspose.Cloud.Pdf.Document document = new Aspose.Cloud.Pdf.Document(" ");

//Create PDF from HTML

document.CreateFromHtml("TestHtml.pdf", "Test.html");


However, before the above stated code is executed, the HTML file needs to be uploaded to Aspose Cloud storage. Following code snippet can upload the file to Aspose Cloud storage.

//specify product URI

Product.BaseProductUri = "http://api.aspose.com/v1.1";

//sepcify App SID

AsposeApp.AppSID = "xxxxxxxxxxxxxxxxxxxxxxxxx";

//sepcify App Key

AsposeApp.AppKey = "xxxxxxxxxxxxxxxxxxxxxxxxx";

Aspose.Cloud.Storage.Folder folder = new Aspose.Cloud.Storage.Folder();

// uplopad file to storage

folder.UploadFile(“Test.html”, “”);<o:p></o:p>


So, you need to set the values for BaseProductUri, AppSID and AppKey, before running any method of SDK.

Hello,

Thanks for your Reply.

I am not able to get code that you mention for assigning Key Value & App SID.
Can you please give me the Exact Path or Location.
I have attached what i got after importing your code into Visual Studio.


Please reply me ASAP.

Thanks
Jigs Mehta.

Hi Jigs,


Thanks for sharing the details.

As per my understanding, you have opened the SDK in Visual Studio, but you need to create your own project, add reference of SDK DLL in your solution and use the methods from SDK to accomplish your requirement. For your reference, I have attached a solution to convert HTML to PDF and before you execute it, you need to specify your App SID and Key in PDF.vb file and run the sample.

For testing purposes, I have used Sample.html in Debug folder to convert to PDF. You may consider using your won files. Also please ensure that you have create an account at Cloud service so that you can get AppKey and AppSID which you can provide before executing the code. In case I can be of any further assistance, please feel free to contact.

Hello,


I had added SID & Key in code then i had implemented that code in our Cloud system.
After implementing this code into Cloud system i am getting this error

Unable to cast object of type ‘System.Byte[]’ to type ‘Aspose.Cloud.Pdf.Document’.

Please resolve this asap.
Thanks
Jigs Mehta

Hi Jigs,

This exception is not related to our cloud service. This is a .NET exception in your code. The problem here is that we do not have your code. You are attaching our SDK with your post but not attaching your own code that you have written by yourself.

We do not have access to your Cloud system and we cannot help until we know what is your code and how are you implementing our SDKs in your code. Please share your complete code (excluding our .NET SDK code) to let us understand the issue.

Best Regards,

Hi,

We are not using .Net for development.we are using OUTSYSTEMS Cloud for Implementation.
In our environment we need to import DLLs from .Net code then we can directly use those functions or Methods which are in your code as an Action.
We have just Pass the value or Object Value and it will work as per your code.
so After implementing this into our System we are getting error.
I am attaching screenshot of our Code and error as well.


Thanks
Jigs Mehta.

Hi Jigs,

Thanks for these details. We have not tested with OUTSYSTEMS yet. We will test our Cloud SDK with OUTSYSTEMS and share more details here. Sorry for the inconvenience.

Best Regards,

Hi Muhammad,

Please Let us know any updates for PDF Functionality integrate with OUTSYSTEMS.
Please revert asap.

Thanks,
Jigs Mehta

Hello,

Please let me inform any Updates on Same?
I want proper answer to implement aspose into OUTSYSTEMS.
Please revert asap.

Thanks

Jigs Mehta

Hi Jigs,

We are working on this and will update you with more details soon (today or tomorrow).

Best Regards,

Hello,

Any updates guys??

Please letme know what is the status.

Thanks
Jigs Mehta

Hi Jigs,

Testing is still in progress but I have not noticed any issue so far. We will share more details with you shortly. Can you please share the steps to reproduce this issue in OUTSYSTEMS?

Best Regards,