Skip to content

Commit

Permalink
Leave the stream open after writing (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
kerams authored Jun 6, 2022
1 parent 2725aac commit e05ed51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/FsPdf/Pdf.fs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ module PdfObject =
writer.Write System.Environment.NewLine

let writePdf (stream:System.IO.Stream) (pdf:PdfObject list) =
use writer = new System.IO.StreamWriter (stream)
use writer = new System.IO.StreamWriter (stream, System.Text.Encoding.UTF8, 1024, true)
writePreamble (writer)
let xrefs = ResizeArray<XRef>()
pdf |> List.iter (fun p -> p |> writeSource writer xrefs; writer.WriteLine ())
Expand Down

0 comments on commit e05ed51

Please sign in to comment.