You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way to create a PDF with all the streams decompressed?
I just want to read a PDF that has compressed (deflate) streams and then immediately create a new PDF that just has all the streams decompressed. Haven't found the function for that.
Does something for the ITokenWrite passed to the PdfDocumentBuilder constructor need to be properly configured to achieve this?
Thanks!
The below code doesn't do the trick currently
static public byte[] DecompressAllStreams(byte[] rawPdf)
{
using (var doc = UglyToad.PdfPig.PdfDocument.Open(rawPdf))
{
var builder = new UglyToad.PdfPig.Writer.PdfDocumentBuilder();
foreach (var page in doc.GetPages())
{
builder.AddPage(doc, page.Number);
}
return builder.Build();
}
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
Is there a way to create a PDF with all the streams decompressed?
I just want to read a PDF that has compressed (deflate) streams and then immediately create a new PDF that just has all the streams decompressed. Haven't found the function for that.
Does something for the ITokenWrite passed to the PdfDocumentBuilder constructor need to be properly configured to achieve this?
Thanks!
The below code doesn't do the trick currently
Beta Was this translation helpful? Give feedback.
All reactions