@VoyagerIT,
I am working on your queries and will get back to you soon.
With further investigation, we found out that this is working fine with Microsoft products like excel and word files.
Please look into this and provide a solution.
@andrey.potapov
@VoyagerIT,
Thank you for your patience. Unfortunately, PowerPoint may not use every software to make a preview of a file inside a presentation. For example, if you embed a JPEG file as an OLE object in a presentation manually (without an icon) you will see the same result as you described above.
@andrey.potapov
In case of prism, if I am adding the object manually, I am able to see the object and I am able to use it in PPT. I followed the below steps:
- Opened an empty presentation
- “Copy Graph” from prism file
- Pasted it in the PPT slide.
- Pasted prism graph is working as an object in PPT.
Please find the screen recording for the steps I followed. I want to implement the same functionality using aspose cloud API, let me know how we can do implement this.
Recording 2024-08-26 142426.zip (4.0 MB)
@VoyagerIT,
Thank you for the details.
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): SLIDESCLOUD-1981
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
Hi @andrey.potapov , We tried with below 2 scenarios-
- Linked a file to PPT
- Embedded file data in PPT
In scenario 2, when we are opening the generated PPT for first time we are able to see “Embedded OLE Object” as an icon, when I double click the object, it is working fine in case of excel, but in case of prism, it is giving package.bin.pzfx icon
In both scenarios, if we add external image as an icon, that behaves static, when we change anything in the object, the icon image preview stays the same.
As per our use case, we should see the preview of prism objects also similar to excel object.
I request you to please help in investigating the issue. And let me know if I am not using the code as per Aspose’s requirement.
Refer to me code below-
public void addObjectToSlide(String filePath, int slideIndex, OleObjectFrame oleFrame) {
log.info("Adding object to slide. File path: {}, Slide index: {}", filePath, slideIndex);
try {
asposeConfig.slidesApi().createShape(filePath, slideIndex, oleFrame, null, null, null, null, null, null);
log.info("Object added to slide successfully. File path: {}, Slide index: {}", filePath, slideIndex);
} catch (ApiException e) {
log.error("Aspose Add Object API failed: ", e);
throw new VHRASException(e);
}
}
public OleObjectFrame createOleObjectDetails(String progId, String linkPath, double x, double y, double width, double height, String base64FileData) {
// Create the OleObjectFrame object
OleObjectFrame oleFrame = new OleObjectFrame();
oleFrame.setX(x);
oleFrame.setY(y);
oleFrame.setWidth(width);
oleFrame.setHeight(height);
oleFrame.setObjectProgId(progId);
oleFrame.setEmbeddedFileBase64Data(base64FileData);
oleFrame.setSubstitutePictureFormat(new PictureFill());
oleFrame.getSubstitutePictureFormat().setBase64Data("/ABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQB//2Q==");
oleFrame.getSubstitutePictureFormat().setPictureFillMode(PictureFill.PictureFillModeEnum.STRETCH);
oleFrame.setSubstitutePictureTitle("My Object");
// oleFrame.setLinkPath("./"+linkPath);
oleFrame.setIsObjectIcon(true);
// Set the file extension based on progId
switch (progId) {
case "Prism10.Document":
oleFrame.setEmbeddedFileExtension("pzfx");
break;
case "Excel.Sheet.12":
oleFrame.setEmbeddedFileExtension("xlsx");
break;
// case "JPEG.Image":
// oleFrame.setEmbeddedFileExtension("jpeg");
// break;
// case "PNG.Image":
// oleFrame.setEmbeddedFileExtension("png");
// break;
case "JMPObject":
oleFrame.setEmbeddedFileExtension("jmp");
break;
case "SpotfireObject":
oleFrame.setEmbeddedFileExtension("dxp");
break;
// case "Word.Document.12":
// oleFrame.setEmbeddedFileExtension("docx");
// break;
default:
throw new IllegalArgumentException("Unsupported ProgID: " + progId);
}
return oleFrame;
}
@VoyagerIT,
This happened because you set the “pzfx” extension for Prism files. Because Prism files have the “prism” extension, you should specify it as follows:
oleFrame.setEmbeddedFileExtension("prism");
I first tried with “prism” only, but this is not working
@andrey.potapov
image.png (14.9 KB)
Error attached when opening object in ppt with “prism” extension
Appreciate your help - Thank you…Pls do consider the sample PPT attached in the below thread - This will give you a fair idea of expectation.
@VoyagerIT,
I’ve reproduced the problem you described above.
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): SLIDESCLOUD-1983
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
Hi @andrey.potapov Thank you for the update, and I really appreciate you looking into this and identifying the root cause.
Just to clarify, the fix would be resolving the below items :
- by default preview of the objects in the ppt slide while embedding instead the placeholder “Ole Embedded Object”
- support extension files as attached : .xlsx, .prism, .jmp, .dxp
This issue is a blocker for deploying our complete application to production environment by next week and require an urgent hotfix.
Please could you confirm the fix you suggested resolves above mentioned 1 and 2, and if we go ahead with the developer paid support - can this be deployed by early next week?
Thanks
Sample extension files.zip (3.1 MB)
@VoyagerIT,
I don’t think issue 1 will be resolved because PowerPoint uses third-party applications to prepare previews when manually inserting files into presentations and Aspose.Slides does not interact with any applications. You should use images or icons instead.
I’ve forwarded this information and sample files to our developers.
Unfortunately, I can’t promise you any timeframe. Our developers need to study the Prism files case first. But if you raise the priority of the problem, it will be solved out of turn.
Hi Andrey,
If we are using linking api to embed the object then we are getting preview successfully - pls see attached. However, if we are embedding the object using embed API - preview is not appearing.
So, how come powerpoint preview is behaving separately if they are using 3rd party application and for aspose link api - it’s working fine but not with aspose embed api.
Link PPT Preview Sample.zip (5.4 MB)
Thanks.
@VoyagerIT,
Thank you for your patience. Unfortunately, I cannot answer your last questions. I am waiting for information from our developers.
Hi Andrey, Any update, please?
We are struggling to deliver the business case to business and badly impacting the go live.
@VoyagerIT,
The issues you found earlier have been blocked by an issue in our core product (Aspose.Slides for .NET). Our developers are already working on the blocking issue. We apologize for any inconvenience caused.
hi, Any further update on this, please? Any eta …