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

[RFE] Save stream functionality #14

Open
ceztko opened this issue Dec 12, 2024 · 2 comments
Open

[RFE] Save stream functionality #14

ceztko opened this issue Dec 12, 2024 · 2 comments

Comments

@ceztko
Copy link

ceztko commented Dec 12, 2024

It would be great to have functionality to save the (possibly uncompressed) stream of an object.

@petervwyatt
Copy link
Member

Thanks for the contribution, and apologies for the slow reply...

Unfortunately, behind the scenes, VSCode insists on converting all data to valid UTF-8 sequences, and thus, invalid UTF-8 sequences, which are valid PDF as binary data, get swallowed. This means any stream saving may not always be a faithful representation of the data (e.g. inline image data in content streams or operands to string painting operators. I suggest using other PDF forensic tools that are better suited to this, such as Apache PDFBox Debugger, iText RUPS, PDF Stream Dumper, PDFXplorer 4, Kyktir, etc. (I'm sure there are others too).

@petervwyatt
Copy link
Member

I am working on a major update that will hopefully address some issues with binary data. It basically involves having the PDF file in memory twice: once in VSCode in a UTF-8-mangled form and another in a pure binary form that the extension manages, and then trying to synchronize what VSCode is doing with the bytes in the PDF binary version.

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