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

Split, Trim, and Extract cmds keep original extra data in result #793

Closed
petrbaranov opened this issue Jan 29, 2024 · 4 comments
Closed
Assignees
Labels

Comments

@petrbaranov
Copy link

petrbaranov commented Jan 29, 2024

The problem is observed with pdfcpu version v0.6.0.

span, trim, and extract commands produce expected result, if the result is opened with a PDF viewer app (e.g. Preview), but the size of the file does not change significantly.

The original pdf file is created with gopdf library.

An example of original file:
generated-export.pdf

size is 3.1M

pdfcpu split -m span generated-export.pdf result 2

produces files into result/ directory, each file is 3.1M.

@hhrutter
Copy link
Collaborator

Hello!

Thanks for reporting this.

I guess you mean split, trim and ... ?
What do you mean by export ?

@petrbaranov
Copy link
Author

Hello!

I meant extract. :)

Corrected my report now

@hhrutter hhrutter changed the title span, trim, and export commands copy extra data to their results. split, trim, and extract commands copy extra data to their results. Jan 29, 2024
@hhrutter
Copy link
Collaborator

I remember that the initial version of some of these just resorted to filtering out pages during writePages which admittedly was a quick hack and meant for small files.

Seems like the time to make this right.

@hhrutter hhrutter changed the title split, trim, and extract commands copy extra data to their results. Split, Trim, and Extract cmds keep original extra data in result Jan 29, 2024
@hhrutter hhrutter added bug and removed investigate labels Jan 29, 2024
@hhrutter
Copy link
Collaborator

This should be fixed with latest commit!

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

No branches or pull requests

2 participants