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

Blank result when output filename is same as PDF #1

Open
rodrigobdz opened this issue Apr 25, 2019 · 0 comments
Open

Blank result when output filename is same as PDF #1

rodrigobdz opened this issue Apr 25, 2019 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@rodrigobdz
Copy link
Owner

Describe the bug
GhostScript deleting content of original file if output filename is same as in original file.

To Reproduce
Steps to reproduce the behavior:

pdfoptim -o printer-manual.pdf printer-manual.pdf

Expected behavior
Output file is optimized version of input file.

Log

Filesize difference -98.55% ✂️
Optimized version of printer-manual.pdf saved as printer-manual.pdf 🎉
# printer-manual.pdf is now blank

Solution
Check arguments and stop script together with a warning if argument outputFile is identical to input filename.

@rodrigobdz rodrigobdz added bug Something isn't working good first issue Good for newcomers labels Apr 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant