I tried this from our software, and then tried it from the standalone program, and it still didn't work. Is there something that I am doing wrong in saving the file?
Here is something like what I am doing, and I will try to include a PDF file that you can test with.
(Delphi 5 is the language we are using)
Code: Select all
var
java, error : WideString
begin
...
PDFXViewer.openPDFDocument( PDFName );
PDFXViewer.GetActiveDocument(pdfDocumentID);
error:='';
java := 'this.flattenPages();';
try
PDFXViewer.RunJavaScript(java,error,0,PXCVA_NoUI);
PDFXViewer.SaveDocument(pdfDocumentID, pdfDocumentName[i], PXCVA_DocumentSaveAs, PXCVA_NoUI);
except
...
end;