aspose-html-cloud / aspose-cloud-for-vscode

MIT License
1 stars 0 forks source link

[feature request] Html2Pdf? #3

Open dotnetCarpenter opened 3 years ago

dotnetCarpenter commented 3 years ago

https://products.aspose.app/html/en/conversion/html-to-pdf is a pretty awesome service. I would imagine that it won't take much effort, given knowledge about Apose Cloud, to add Html to Pdf support in aspose-cloud-for-vscode.

agubalaspose commented 3 years ago

@dotnetCarpenter Thank you very much for the request. We highly appreciate your interest in our product. We think it might be a good idea. We will evaluate it internally and consider to include in the roadmap. The only possible complexity is that HTML file, unlike markdown, has external dependencies - CSS, javascript, images. As you are in VS Code, most of them are likely local files, that should also be included. Without them an output of a conversion will not look correct. We will think how to approach the task. At the mean time please consider our API for conversion https://apireference.aspose.cloud/html/. With the API a developer can explicitly specify html file with dependent resources. Please let us know if you need any help with the API. We will provide code snippets on your request.

dotnetCarpenter commented 3 years ago

Aspose API

Thanks for the link to your API! But for some reason I can not login to your service using github. I've tried for the past week to create an account to no avail. https://id.containerize.com/callback?error=access_denied

Oops! Something went wrong.
There was an error logging into the external provider. The error message is: access_denied

Request Id: 35e341d3-4f7a-4818-93cf-05cb550640d1

vscode extension

vscode now has a Live Preview feature baked in. I would expect an HTML vscode extension to be able to operate on the same resources. I realise that it is much easier to develop live preview since you let the browser handle all of the resources and for Html2Pdf you actually have to handle the resources. But doing an HTTP request is very simple and your product is already capable of handling most resources that browsers handles today. I imagine bundling the local resources and send to your API and any external resources gets the usual treatment from your servers. You might be able to do all of this from vscode and send a zip file though.

If I were to write down my expectations, the list would be HTML, CSS, SVG, JPEG, PNG, JS (only for DOM manipulation) and DOM. Many of these technologies, like CSS, JS, DOM, comes with some granularity. E.i. neither need 100% support before being immensely useful. On the other hand, I would expect HTML, SVG (version 1), JPEG and PNG to enjoy full support.

agubalaspose commented 3 years ago

Registration

@dotnetCarpenter Thank you for bringing this up. We checked that GitHub has recently deprecated our way to sign in. We will work to resolve it as soon as possible. At the meantime please consider registering here https://id.containerize.com/signup This is a classic registration with email address. After the registration please take the next steps to obtain Client Id and Client Secret required for our API and/or SDK:

  1. Go to Cloud Dashboard: https://dashboard.aspose.cloud/#/apps
  2. In side bar select "Storages": image
  3. On the Storage page click "Create New Storage" and take required steps to create storage: image
  4. Navigate to "Applications": image
  5. Create new application: image
  6. Click on the newly created application: image
  7. Find Client Id and Client Secret on the bottom of the application page: image

Please let us know if you need any help or code samples. Our REST API is located here: https://apireference.aspose.cloud/html/ Alternatively, here is a link to our SDK for different languages: https://github.com/aspose-html-cloud

vscode extension

Thank you for your valuable comments and the reference to Live Preview. We will include the option in our investigation around the topic.