Control loading of external resources

Aspose.Words allows me to implement custom logic, to either provide or
block external resources, linked in a file. This is acomplished by
setting ResourceLoadingCallback in LoadOptions. Is there any way to do
this in Aspose.Slides.

Hi Klemen,

I have observed your requirement and have not been able to completely understand that. Can you please elaborate it and also share in the form of snapshot that what actually you are looking in Aspose.Slides to offer you. I will be able to investigate the requirement further and help you out once requested information will be shared.

Many Thanks,

Like all open office XML formats, pptx file can contain a reference to
another file on file system, an image for example. Aspose.Presentation resolves those references automatically and when converting a pptx to
pdf, renders both linked and embedded images into generated pdf file. I
would like to block Aspose.Presentation from processing linked files
automatically.

In Aspose.Words this can be accomplished using a
callback method, that is specified in LoadOptions, when loading
Aspose.Words.Document.

var Document = new Aspose.Words.Document(fileStream, new LoadOptions(GetDocumentFormat(fileName), “”, “”)
{
ResourceLoadingCallback = new ResourceLoader()
});

public class ResourceLoader : IResourceLoadingCallback
{
public ResourceLoadingAction ResourceLoading(ResourceLoadingArgs args)
{
var uri = new Uri(args.OriginalUri);
if (uri.Scheme == Uri.UriSchemeFile)
{
return ResourceLoadingAction.Skip;
}
return ResourceLoadingAction.Default;
}
}

Hi Klemen,


I have observed the comments shared by you and like to share that Aspose.Slides for .NET does not include link files in exported PDF when rendering the presentations as per my understanding. I request you to please share the source presentation with linked images or data along with linked data with me. Please also share the generated PDF with linked data as well so that I may be able to understand the issue on my end to help you out.

Many Thanks,

You’re correct. We were testing this behaviour with wrong set of files. I’m sorry I bothered you with this, you can close this ticket.

Hi Klemen,


You are always welcome. Please share, if I may help you further in this regard.

Many Thanks,