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

Extract PDF on file system instead of memory #16958

Merged
merged 10 commits into from
Nov 7, 2024

Conversation

hishamco
Copy link
Member

@hishamco hishamco commented Nov 6, 2024

Fixes #16955

// MemoryStream.
seekableStream = new MemoryStream();
// While this involves loading the file into memory, we don't really have a choice.
seekableStream = new FileStream(Path.GetTempFileName(), FileMode.Create, FileAccess.Write, FileShare.None, 4096, FileOptions.DeleteOnClose | FileOptions.Asynchronous);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hishamco please check the differences between GetTempFileName() and GetRandomFileName(), you'll see what was wrong with your combine.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't use GetRandomFileName() :)

@MikeAlhayek MikeAlhayek enabled auto-merge (squash) November 7, 2024 18:41
@MikeAlhayek MikeAlhayek merged commit 5a14fb7 into main Nov 7, 2024
7 checks passed
@MikeAlhayek MikeAlhayek deleted the hishamco/PdfMediaFileTextProvider branch November 7, 2024 18:52
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

Successfully merging this pull request may close these issues.

Extract PDF on file system instead of memory
3 participants