Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save output PDF as original PDF File #32

Open
erodriguezseda opened this issue Dec 8, 2023 · 1 comment
Open

Save output PDF as original PDF File #32

erodriguezseda opened this issue Dec 8, 2023 · 1 comment

Comments

@erodriguezseda
Copy link

First, this tool is awesome! I am starting to like Google Docs as it facilitates collaboration, but I hate that Google Docs doesn't translate the TOC when saving it as a PDF, and making the doc --> docx --> pdf messes with the format.

Anyway: I would like to automatically save the output file (with the TOC) as the original file. That is, I do not want to have two files (keeping the original without the TOC).

I tried:
pdftocio -o original.pdf original.pdf < toc
but I get an error: save to original must be incremental

Is there an easy way to automatically saved the TOC in the original file? Thanks!

@Simon2142
Copy link

I think this is a general "problem" with command-line utilities, they don't allow redirecting output to the same file used as input. Although it may seem obvious, the easiest thing to do is just do something like this:
pdftocio original.pdf < toc; mv original_out.pdf original.pdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants