We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Image naming request

Hi guys,

We have a sales quotation web app that displays quotes in html (browser) and as Word docs with a separate code base for generating each type of quote.

Since moving to Aspose.Words, we are trying unify our codebase by generating quotes using Aspose.Words (for documents) and then coverting to HTML for browser display.

We also send quote emails from our app (email message has inline html that is same as browser displays).

We display an image in the quote based on the salesperson performing the quote. We insert the image into the word doc and then it gets coverted to html. We’d like to be able specific the name of the image that gets generated in the html. My manager likes the way images are handled in our current solution (images point to a url on our server) - if we continue with the Aspose solution, we’ll have to manage deleting the temporary images (which would cause the image to disappear when viewed in email). (We also use BASE HREF in our email html to locate images on the server).

Is there any progress in this area?

Thanks,

Scott

Hi Scott,

We may consider adding the possibility for tag output customization.

Imagine that you have a special event that is called everytime the tag is written to the output html. How do you plan to get the image URL which should be put into the src attribute?

Best Regards,

Vladimir,

Sorry for the late reply - I got sidetracked with a release and am just following up on this issue.

Currently, we display one image as a header for our quotes. The image file name is stored in our database. Prior to calling the quote generation code, we have a method that “builds” the image URL based on the salesperson that is generating the quote. That URL is passed to our quote generation method (which builds the Aspose.Words document). So, in our simple case, when the event is triggered, we would set the src attribute with the URL passed as a parameter to our doc generator method.

Does this answer your question? Also, this is a simplified case - if we had multiple images per quote, we would probably do some sort of lookup when each image tag event is generated.

Let me know if I can supply any more details.

Thanks,

Scott

Thank you very much for the info. I will check if it is possible to implement this feature and inform you in 1-2 days.

Best regards,

Super - Thanks…

It was logged to our defect base as a feature request (issue #1038). We will try to implement it in the nearest future.

Thanks for your consideration and excellent support.

- Scott

The issues you have found earlier (filed as 1038) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by alexey.noskov.

Hello Scott!

Thank you for your patience. In the latest release we have implemented a new feature that allows you control how output supplementary images are named.

To alter file names please implement a handler of this event:
https://reference.aspose.com/words/net/aspose.words.saving/htmlsaveoptions/properties/imagesavingcallback

In particular, you can build up a new name analyzing CurrentShape.ImageData.Title, CurrentShape.ImageData.SourceFullName, CurrentShape.Name and name generated by default.

You can also specify folder where to save all images and folder alias, the base URI to refer files in the output HTML. Now this is available while saving either to a file or to a stream. See these properties:

https://reference.aspose.com/words/net/aspose.words.saving/htmlsaveoptions/properties/imagesfolder

https://reference.aspose.com/words/net/aspose.words.saving/htmlsaveoptions/properties/imagesfolderalias

Here is the latest version, Aspose.Words 6.1.0:

https://downloads.aspose.com/words/net

Regards,

The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan