Skip to main content
Participant
April 3, 2024
Question

HFT functions for All Tools -> Export a PDF option

  • April 3, 2024
  • 1 reply
  • 368 views

In the plugin code, I am trying to intercept/replace AVDocDoSave,  AVDocDoSaveAs and AVDocDoSaveAsWithParams functions to identify the original file when the user tries to export the file from menu option.  This seems to be working fine, when I am  clicking SaveAs/Export a PDF.   But when I try export a PDF option from Tools, none of the above functions are being called and I am not able to identify the original file that is being exported.  Could you please let me know if there is any known issue with the behaviour or any other HFT functions I can try to intercept/replace to get the file information (AVDoc or PDDoc structure)  when  All Tools -> Export a PDF option is used to export the file. 

 

Thanks in advance

This topic has been closed for replies.

1 reply

Thom Parker
Community Expert
Community Expert
April 3, 2024

I'm assuming that you setup notification callbacks for the "PDDocDidSave"?  

The export tool does a conversion to a non-pdf format, so the actual file saved is not a PDF and I beleive it's not being done in Acrobat. The conversion is done in the native tool for that format.  

 

There are a lot of very detailed notifications, but I don't know of any related to exporting to a different format. I suspect this is because format conversion wasn't a thing when the SDK was setup.  But there might be notifications are are related. For example maybe a print notification? Printing is kind of like exporting. Or you could use the "AVAppToolDidChange" to figure out when the export tools are being used. Not sure if this will work. You could also setup notifications for all kinds of events and see what happens. One that looked interesting is "AVDocDidPerformAction". 

 

 

 

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Participant
April 4, 2024

Thank you for the suggestions. Will check these.