0

I need to execute SaveAs method of the file is loaded to the class object TAcroPDF (ActiveX Acrobat Reader - AcroPDF.dll). The property is loaded with LoadFile method.

In addition, I have a question if anyone knows how to call the SaveAs function for an OLE Object taken to TOleContainer (oleContainer.OleObject). For example, for Microsoft Word and Excel, the file can be saved with:

oleContainer1.OleObject.SaveAs ('d:\file.docx');

For a pdf file method is not supported.

Emil J
  • 215
  • 2
  • 4
  • 20
  • The ActiveX has a type library which defines its functionality. It is also documented. Use those to work out which function to call. – David Heffernan Jun 06 '13 at 09:09
  • Unfortunately I can not find information on how to save the file. The indicator contains a "Save" button, but I do not know how to use it. – Emil J Jun 06 '13 at 09:17
  • 1
    You've got the source code for `TAcroPDF`. What can you find there. I mean, I could import the typelib and look, but then you'd learn nothing. If you learn how to do it yourself, that's best for everyone. – David Heffernan Jun 06 '13 at 09:35
  • I imported the library, but it does not export a function similar to the SaveAs, so I asked the question. Your answers, unfortunately, are not helpful. – Emil J Jun 06 '13 at 10:03
  • Can not create an object of class "AcroExch.PDDoc". Only "AcroExch.Document" or the reason may be the lack of an installed full version of Acrobat Reader? – Emil J Jun 06 '13 at 10:57
  • I think all that functionality is in standard acrobat and not in the reader. My answer should help. – David Heffernan Jun 06 '13 at 10:59

1 Answers1

0

From what I can tell, the ActiveX control that ships with the reader is much cut down from that supplied with the full product. It does not include any means to save a file, unlike the ActiveX for the full product.

But that's not a limitation since the reader cannot modify files. You don't need Acrobat Reader to save the file for you. You can do what you need by way of a simple file copy. Use CopyFile for that.

David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490
  • I've noticed is that I do not have class "AcroExch.PDDoc" the reasons for the free version of Acrobat Reader. I am anxious to save files as Word and Excel, with the help of TOleContainer, but on some workstations there is information that can not be found IPersistFile interface. What can be pomód (may lack some libraries'). Only some stations have this problem, the other with the same version installed Microsoft Office everything was running smoothly. – Emil J Jun 06 '13 at 11:02
  • Well, now I've got no idea what you talking about. I thought the question was about Acrobat Reader. I struggling to see how Word and Excel come into play. – David Heffernan Jun 06 '13 at 11:05
  • Ok. Maybe I stirred a little. It's actually a different topic and ask a new question. Thanks for your help. – Emil J Jun 06 '13 at 11:18