Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Can javascript be used to batch replace images within a PDF from image files?

New Here ,
Mar 28, 2016 Mar 28, 2016

I want to batch process the images within some PDFs. I'm thinking the way to do that would be to export all images from the PDF to separate image files, batch process those in a photo editor, and then use javascript to batch replace the original PDFs' images with the processed versions. However I haven't been able to find any indication of such ability in the Acrobat SDK or any mention on the internets of anybody having tried it. Does anybody know if it's at least in theory possible? Can anyone point me to the right function to use?

Note that there's more in these PDFs than images, so rebuilding new PDFs from the processed image files is not an option.

TOPICS
Acrobat SDK and JavaScript
941
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Mar 28, 2016 Mar 28, 2016

No, it's not. JS has no access to the image streams in a PDF file. You can, in principle, overlay the old images with the new ones (using button fields to hold the new images), but then the issue is that you can't detect the location of the old images. In short, you need to look for a different solution.

Translate
Community Expert ,
Mar 28, 2016 Mar 28, 2016

No, it's not. JS has no access to the image streams in a PDF file. You can, in principle, overlay the old images with the new ones (using button fields to hold the new images), but then the issue is that you can't detect the location of the old images. In short, you need to look for a different solution.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 28, 2016 Mar 28, 2016
LATEST

oh heckety heck

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines