How to remove PDF bookmarks (from terminal or programatically)?
I was surprised that there is no easy way to remove bookmarks from PDF.
pdftk can't do it, ghostscript same AFAIK, qpdf... and there are no other significant tools that I'm aware of
Easiest for me right now is PDF Mod GUI, which removes bookmarks one by one - user has to click on parent bookmark and press remove, so on for all top level nodes which is silly
Also I know there are probably some Java GUIs that can do it, but I don't want to load java just to remove bookmarks when I need to
I could also accept some programmatic solution, python, perl ...
linux pdf
add a comment |
I was surprised that there is no easy way to remove bookmarks from PDF.
pdftk can't do it, ghostscript same AFAIK, qpdf... and there are no other significant tools that I'm aware of
Easiest for me right now is PDF Mod GUI, which removes bookmarks one by one - user has to click on parent bookmark and press remove, so on for all top level nodes which is silly
Also I know there are probably some Java GUIs that can do it, but I don't want to load java just to remove bookmarks when I need to
I could also accept some programmatic solution, python, perl ...
linux pdf
Related: How to import, export and edit bookmarks of a pdf file?
– Ƭᴇcʜιᴇ007
Dec 19 '11 at 18:19
add a comment |
I was surprised that there is no easy way to remove bookmarks from PDF.
pdftk can't do it, ghostscript same AFAIK, qpdf... and there are no other significant tools that I'm aware of
Easiest for me right now is PDF Mod GUI, which removes bookmarks one by one - user has to click on parent bookmark and press remove, so on for all top level nodes which is silly
Also I know there are probably some Java GUIs that can do it, but I don't want to load java just to remove bookmarks when I need to
I could also accept some programmatic solution, python, perl ...
linux pdf
I was surprised that there is no easy way to remove bookmarks from PDF.
pdftk can't do it, ghostscript same AFAIK, qpdf... and there are no other significant tools that I'm aware of
Easiest for me right now is PDF Mod GUI, which removes bookmarks one by one - user has to click on parent bookmark and press remove, so on for all top level nodes which is silly
Also I know there are probably some Java GUIs that can do it, but I don't want to load java just to remove bookmarks when I need to
I could also accept some programmatic solution, python, perl ...
linux pdf
linux pdf
asked Dec 19 '11 at 16:59
zetahzetah
366513
366513
Related: How to import, export and edit bookmarks of a pdf file?
– Ƭᴇcʜιᴇ007
Dec 19 '11 at 18:19
add a comment |
Related: How to import, export and edit bookmarks of a pdf file?
– Ƭᴇcʜιᴇ007
Dec 19 '11 at 18:19
Related: How to import, export and edit bookmarks of a pdf file?
– Ƭᴇcʜιᴇ007
Dec 19 '11 at 18:19
Related: How to import, export and edit bookmarks of a pdf file?
– Ƭᴇcʜιᴇ007
Dec 19 '11 at 18:19
add a comment |
5 Answers
5
active
oldest
votes
If you have Adobe Acrobat Pro you can remove all the bookmarks of your front PDF document using the following simple AppleScript:
tell application "Adobe Acrobat Pro"
delete bookmarks of document 1
end tell
add a comment |
The easy way I've found to remove all bookmarks from a PDF has been just opening the document and printing it as PDF into a new file.
It works, it's fast, and it's simple.
add a comment |
This worked for me:
pdf2ps mypdf.pdf
I get mypdf.ps, I rename it to mypdf2.ps
ps2pdf mypdf2.ps
The mypdf2.pdf file that I get has no bookmarks
Both programs come with the ghostscript package
Despite thrashing my HD, calling ghostscript twice is slower and more memory intensive then loading worse java GUI to handle the problem. It's easier to just print the PDF to another PDF as I'll at least get PDF product with text layer, unlike your example, and faster
– zetah
Dec 21 '11 at 0:56
add a comment |
Here is one easy (though not necessarily cheap) way.
- Use Adobe Acrobat DC (or Pro whatever version).
- Go here and install the Action "Remove hidden information".
This action also allows you to remove other annoying hidden information other than bookmarks (see image below). This can help reduce the file size.
Used in tandem with Adobe Acrobat's Action Wizard, you can also batch delete bookmarks from any number of PDFs.

add a comment |
A solution with pdftk from www.witti.ws:
The solution is to specify the page range of the PDF. The documented behavior of the cat operation is to only preserve bookmarks when no page range is specified. It also confirms that A1-end will always include the entire PDF. Testing confirms that this purges the PDF of any bookmarks.
pdftk A=example_input.pdf cat A1-end output example_output.pdf
That worked for me.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f369556%2fhow-to-remove-pdf-bookmarks-from-terminal-or-programatically%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
5 Answers
5
active
oldest
votes
5 Answers
5
active
oldest
votes
active
oldest
votes
active
oldest
votes
If you have Adobe Acrobat Pro you can remove all the bookmarks of your front PDF document using the following simple AppleScript:
tell application "Adobe Acrobat Pro"
delete bookmarks of document 1
end tell
add a comment |
If you have Adobe Acrobat Pro you can remove all the bookmarks of your front PDF document using the following simple AppleScript:
tell application "Adobe Acrobat Pro"
delete bookmarks of document 1
end tell
add a comment |
If you have Adobe Acrobat Pro you can remove all the bookmarks of your front PDF document using the following simple AppleScript:
tell application "Adobe Acrobat Pro"
delete bookmarks of document 1
end tell
If you have Adobe Acrobat Pro you can remove all the bookmarks of your front PDF document using the following simple AppleScript:
tell application "Adobe Acrobat Pro"
delete bookmarks of document 1
end tell
answered Apr 23 '12 at 17:57
organognosiorganognosi
392
392
add a comment |
add a comment |
The easy way I've found to remove all bookmarks from a PDF has been just opening the document and printing it as PDF into a new file.
It works, it's fast, and it's simple.
add a comment |
The easy way I've found to remove all bookmarks from a PDF has been just opening the document and printing it as PDF into a new file.
It works, it's fast, and it's simple.
add a comment |
The easy way I've found to remove all bookmarks from a PDF has been just opening the document and printing it as PDF into a new file.
It works, it's fast, and it's simple.
The easy way I've found to remove all bookmarks from a PDF has been just opening the document and printing it as PDF into a new file.
It works, it's fast, and it's simple.
answered Sep 10 '18 at 14:08
sharcashmosharcashmo
1214
1214
add a comment |
add a comment |
This worked for me:
pdf2ps mypdf.pdf
I get mypdf.ps, I rename it to mypdf2.ps
ps2pdf mypdf2.ps
The mypdf2.pdf file that I get has no bookmarks
Both programs come with the ghostscript package
Despite thrashing my HD, calling ghostscript twice is slower and more memory intensive then loading worse java GUI to handle the problem. It's easier to just print the PDF to another PDF as I'll at least get PDF product with text layer, unlike your example, and faster
– zetah
Dec 21 '11 at 0:56
add a comment |
This worked for me:
pdf2ps mypdf.pdf
I get mypdf.ps, I rename it to mypdf2.ps
ps2pdf mypdf2.ps
The mypdf2.pdf file that I get has no bookmarks
Both programs come with the ghostscript package
Despite thrashing my HD, calling ghostscript twice is slower and more memory intensive then loading worse java GUI to handle the problem. It's easier to just print the PDF to another PDF as I'll at least get PDF product with text layer, unlike your example, and faster
– zetah
Dec 21 '11 at 0:56
add a comment |
This worked for me:
pdf2ps mypdf.pdf
I get mypdf.ps, I rename it to mypdf2.ps
ps2pdf mypdf2.ps
The mypdf2.pdf file that I get has no bookmarks
Both programs come with the ghostscript package
This worked for me:
pdf2ps mypdf.pdf
I get mypdf.ps, I rename it to mypdf2.ps
ps2pdf mypdf2.ps
The mypdf2.pdf file that I get has no bookmarks
Both programs come with the ghostscript package
answered Dec 20 '11 at 10:26
golimargolimar
691420
691420
Despite thrashing my HD, calling ghostscript twice is slower and more memory intensive then loading worse java GUI to handle the problem. It's easier to just print the PDF to another PDF as I'll at least get PDF product with text layer, unlike your example, and faster
– zetah
Dec 21 '11 at 0:56
add a comment |
Despite thrashing my HD, calling ghostscript twice is slower and more memory intensive then loading worse java GUI to handle the problem. It's easier to just print the PDF to another PDF as I'll at least get PDF product with text layer, unlike your example, and faster
– zetah
Dec 21 '11 at 0:56
Despite thrashing my HD, calling ghostscript twice is slower and more memory intensive then loading worse java GUI to handle the problem. It's easier to just print the PDF to another PDF as I'll at least get PDF product with text layer, unlike your example, and faster
– zetah
Dec 21 '11 at 0:56
Despite thrashing my HD, calling ghostscript twice is slower and more memory intensive then loading worse java GUI to handle the problem. It's easier to just print the PDF to another PDF as I'll at least get PDF product with text layer, unlike your example, and faster
– zetah
Dec 21 '11 at 0:56
add a comment |
Here is one easy (though not necessarily cheap) way.
- Use Adobe Acrobat DC (or Pro whatever version).
- Go here and install the Action "Remove hidden information".
This action also allows you to remove other annoying hidden information other than bookmarks (see image below). This can help reduce the file size.
Used in tandem with Adobe Acrobat's Action Wizard, you can also batch delete bookmarks from any number of PDFs.

add a comment |
Here is one easy (though not necessarily cheap) way.
- Use Adobe Acrobat DC (or Pro whatever version).
- Go here and install the Action "Remove hidden information".
This action also allows you to remove other annoying hidden information other than bookmarks (see image below). This can help reduce the file size.
Used in tandem with Adobe Acrobat's Action Wizard, you can also batch delete bookmarks from any number of PDFs.

add a comment |
Here is one easy (though not necessarily cheap) way.
- Use Adobe Acrobat DC (or Pro whatever version).
- Go here and install the Action "Remove hidden information".
This action also allows you to remove other annoying hidden information other than bookmarks (see image below). This can help reduce the file size.
Used in tandem with Adobe Acrobat's Action Wizard, you can also batch delete bookmarks from any number of PDFs.

Here is one easy (though not necessarily cheap) way.
- Use Adobe Acrobat DC (or Pro whatever version).
- Go here and install the Action "Remove hidden information".
This action also allows you to remove other annoying hidden information other than bookmarks (see image below). This can help reduce the file size.
Used in tandem with Adobe Acrobat's Action Wizard, you can also batch delete bookmarks from any number of PDFs.

edited Aug 19 '15 at 13:15
answered Aug 19 '15 at 7:59
Kenny LJKenny LJ
1812924
1812924
add a comment |
add a comment |
A solution with pdftk from www.witti.ws:
The solution is to specify the page range of the PDF. The documented behavior of the cat operation is to only preserve bookmarks when no page range is specified. It also confirms that A1-end will always include the entire PDF. Testing confirms that this purges the PDF of any bookmarks.
pdftk A=example_input.pdf cat A1-end output example_output.pdf
That worked for me.
add a comment |
A solution with pdftk from www.witti.ws:
The solution is to specify the page range of the PDF. The documented behavior of the cat operation is to only preserve bookmarks when no page range is specified. It also confirms that A1-end will always include the entire PDF. Testing confirms that this purges the PDF of any bookmarks.
pdftk A=example_input.pdf cat A1-end output example_output.pdf
That worked for me.
add a comment |
A solution with pdftk from www.witti.ws:
The solution is to specify the page range of the PDF. The documented behavior of the cat operation is to only preserve bookmarks when no page range is specified. It also confirms that A1-end will always include the entire PDF. Testing confirms that this purges the PDF of any bookmarks.
pdftk A=example_input.pdf cat A1-end output example_output.pdf
That worked for me.
A solution with pdftk from www.witti.ws:
The solution is to specify the page range of the PDF. The documented behavior of the cat operation is to only preserve bookmarks when no page range is specified. It also confirms that A1-end will always include the entire PDF. Testing confirms that this purges the PDF of any bookmarks.
pdftk A=example_input.pdf cat A1-end output example_output.pdf
That worked for me.
answered Jan 31 at 11:13
nevromenevrome
1063
1063
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f369556%2fhow-to-remove-pdf-bookmarks-from-terminal-or-programatically%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Related: How to import, export and edit bookmarks of a pdf file?
– Ƭᴇcʜιᴇ007
Dec 19 '11 at 18:19