Skip to content

Commit

Permalink
Add images to word export (#22)
Browse files Browse the repository at this point in the history
* Add images to word export

Create image part for a word doc, create images,
clone images between document fragments,
and track relationship IDs of images.

Export caption text. Formatting of image captions
will be handled separately.

* Cleanup word fragment writer dispose
  • Loading branch information
aror92 authored Apr 12, 2024
1 parent d0e4523 commit b800cf5
Show file tree
Hide file tree
Showing 4 changed files with 361 additions and 50 deletions.
5 changes: 2 additions & 3 deletions Src/xWorks/ConfiguredLcmGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,7 @@ private static string GenerateSrcAttributeFromFilePath(ICmFile file, string subF
{
filePath = MakeSafeFilePath(file.AbsoluteInternalPath);
}
return settings.UseRelativePaths ? filePath : new Uri(filePath).ToString();
return filePath;
}

private static string GenerateSrcAttributeForMediaFromFilePath(string filename, string subFolder, GeneratorSettings settings)
Expand Down Expand Up @@ -1940,9 +1940,8 @@ private static IFragment GeneratePictureContent(ConfigurableDictionaryNode confi
contentGenerator.WriteProcessedContents(writer, settings.ContentGenerator.AddImageCaption(captionBldr.ToString()));
}
writer.Flush();
return bldr;
}

return bldr;
}

private static IFragment GenerateCollectionItemContent(ConfigurableDictionaryNode config, DictionaryPublicationDecorator publicationDecorator,
Expand Down
Loading

0 comments on commit b800cf5

Please sign in to comment.