Hi,
I just used the search, but I couldn’t find anything about my issue.
We convert different files (Excel, Word, PDF) to different other formats
(Pdf, XPS, Tiff).
As we do not really know, where the files come from, we don’t want these file to do any harm on our sever using some sort of scripting. Is there a need to take care of scripting, or is there a posibility to deactivate all kinds of scripting / active contents in these files?
best regards,
Oliver
Hi,
Thanks for using Aspose.Total.
I am Aspose.Cells representative. Aspose.Cells is used to create and manipulate Ms-Excel documents.
In some cases, Aspose.Cells generates temporary files which are harmless, these files are mostly related to images, style sheets or streams etc.
Could you please attach some of these files which are being generated by Aspose.Cells at your end? We will look into these files and advise you asap.
Regarding your issues relating to Word and Pdf documents, Aspose.Words and Aspose.Pdf team will soon look into it and advise you asap.
Hi Oliver,
Sorry for a delayed response.
I am a representative of Aspose.Pdf. If your requirement is to disable / remove the script from a PDF file from a user before performing any operation or conversion, you may use the Strip method of the PdfJavaScriptStripper class in the Aspose.Pdf.Facades namespace. Following are the 2 overloaded methods and their details:
If you have any further queries or different requirements, please feel free to contact support.
Thank You & Best Regards,
Hi
Oliver,
Hi,
thank you for your information. The strip-method for pdf sounds interesting, also the removeMakros-statement for word. I think this will do exactly what I want.
@mshakeel.faiz: is there an equivalent function for excel as well? I like to remove makros from excel-files, before I try to convert them to pdf-files.
thank you all very much for your answers so far.
best regards,
Oliver
Hi,
Hi,
thank you for your support, the RemoveMacro-function is fine.
There is one more thing, I need to do, I would like to eliminate external links.
In the provided zip-file, there is a simple word-doc, where I included a testfile from “c:” via external link, so the image is not included in the word file, but lies beside the docfile on the disk and is loaded temporarily, when the doc-file is opened. Is there a way to eliminate or deactivate these external links?
Our code is something like this:
doc = new Aspose.words.document(sInFile);
doc.RemoveMacros();
doc.Save(sOutFile, Aspose.Words.SaveFormat.Pdf);
kind regards,
Oliver
Hi Oliver,
Thanks for your inquiry.
Images in Word documents are either represented by Shape nodes or by DrawingML nodes when loading into Aspose.Words’ DOM. The image found in your ‘test.docx’ document is actually represented by DrawingML node. You can find more information about DrawingML class in the following API page:
You can remove these nodes by using the Shape.Remove method:
Please let us know if you need more information, we are always glad to help you.
Best Regards,