Hi,
I want to use savehtml(or savestream), and I need to specific the image name. But I found savehtml only can save the image with a name:prefix+num.
Is there any way to save the image with a specific name?
Any help is appericate.
specific the image name in savehtml
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
You can specify the image file name in the item properties.
See rvespImageFileName in http://www.trichview.com/help/idh_type_ ... perty.html
If rvsoUseItemImageFileNames is included in the Options parameter of SaveHTML/SaveHTMLEx, images with defined (non-empty) file names will not be saved, but their file names will be written in HTML (paths will be converted to relative paths).
If you need something different, you can use OnHTMLSaveImage or OnSaveImage2 events.
See rvespImageFileName in http://www.trichview.com/help/idh_type_ ... perty.html
If rvsoUseItemImageFileNames is included in the Options parameter of SaveHTML/SaveHTMLEx, images with defined (non-empty) file names will not be saved, but their file names will be written in HTML (paths will be converted to relative paths).
If you need something different, you can use OnHTMLSaveImage or OnSaveImage2 events.
Thanks!
I've add rvsoUseItemImageFileNames to Options parameter of SaveHTML, but in HTML the images' name are also prex+num. I specific the images' name like this: rve->InsertPicture("name", gr, rvvaBaseline). Is it right way to specific the image's name?
I search the whol forum, I coudn't find a sample code for OnSaveImage2 event to help me fix this problem. Is there a sample for it?
Any help is appericate.
I've add rvsoUseItemImageFileNames to Options parameter of SaveHTML, but in HTML the images' name are also prex+num. I specific the images' name like this: rve->InsertPicture("name", gr, rvvaBaseline). Is it right way to specific the image's name?
I search the whol forum, I coudn't find a sample code for OnSaveImage2 event to help me fix this problem. Is there a sample for it?
Any help is appericate.
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
The first parameter of InsertPicture is an "item name", it is not used by the component itself. rvespImageFileName is assigned differently.
To make insertion and assigning this property a single operation, undo records must be grouped.
To make insertion and assigning this property a single operation, undo records must be grouped.
Code: Select all
rve->TopLevelEditor->BeginUndoGroup(rvutInsert);
rve->TopLevelEditor->SetUndoGroupMode(true);
if (rve->InsertPicture("name", gr, rvvaBaseline))
rve->SetCurrentItemExtraStrProperty(rvespImageFileName, ImageFileName, true);
rve->TopLevelEditor->SetUndoGroupMode(false);