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

If there is only one bookmark then I need to delete it.

Explorer ,
Oct 09, 2018 Oct 09, 2018

Copy link to clipboard

Copied

Hello,

I have a folder of files having over 8-10 thousand pdf file on it.... most of these files has only one bookmark on them but maybe around 1000 of them has multiple bookmark on them...

I need to split these files into separate file using top level bookmarks. Problem/bug that Adobe Pro split function has, is that for all those files with one book mark it creates duplicate file for it.... i.e. there is a file called A.pdf with one single bookmark on it called BM.  Now when I ran the Split function to split it using top level bookmark, it creates another file called A_Part1.pdf in the same folder now in the same folder I have two identical file called A.pdf & A_Part1.pdf.  I do not need duplicate file with two different name.  I need to stop this duplication of file... if there is only one Bookmark then splitting operation should be skipped so I only have one file in the folder called A.pdf or if it creates A_Part1.pdf then it should delete the original file if there are no pages/zero left on the Original file.

Can Adobe fix this bug or somebody help me to over come this dilemma?

Regards,

MR...

TOPICS
Acrobat SDK and JavaScript , Windows

Views

354

Translate

Translate

Report

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 , Oct 11, 2018 Oct 11, 2018

You can use this code to do it:

if (this.bookmarkRoot.children!=null && this.bookmarkRoot.children.length==1)

    this.bookmarkRoot.children[0].remove();

Votes

Translate

Translate
Community Expert ,
Oct 11, 2018 Oct 11, 2018

Copy link to clipboard

Copied

LATEST

You can use this code to do it:

if (this.bookmarkRoot.children!=null && this.bookmarkRoot.children.length==1)

    this.bookmarkRoot.children[0].remove();

Votes

Translate

Translate

Report

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