pdf-writer

Why does breaking out of a foreach loop cause complaint “Cannot access a closed Stream”?

那年仲夏 提交于 2019-12-12 03:06:26
问题 Based on the suggestion in the comments here, I refactored my method to try to assign data to a MemoryStream outside of the iTextSharp.text.Document "using" (but within the MemoryStream using clause): internal static HttpResponseMessage GeneratePDFOfReportFutures() { HttpResponseMessage result = null; futureReports = GetAllFutureReports(); try { using (var ms = new MemoryStream()) { using (var doc = new Document(PageSize.A4.Rotate(), 25, 25, 25, 25)) // the "Rotate" makes it landscape

pdf-writer invalid multibyte char (US-ASCII) expecting keyword_end content = “%PDF-#{@version}\n%âãÏÓ\n” Rails 3

为君一笑 提交于 2019-12-07 16:28:33
问题 I have a problem with the pdf-writer gem on a collaborative project I'm trying to run, I'm using RVM , Ruby 1.9.2p180 , Rails 3.1.0 on Ubuntu 10.10 . I created a new gemset to install the required gems with Bundler, but when I try to run the app I get the fallowing error; josethernandezc@DG965WH:~/Desktop/conest31$ rails s /home/josethernandezc/.rvm/gems/ruby-1.9.2-p180@conest31/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:240:in `require': /home/josethernandezc/.rvm/gems/ruby

pdf-writer invalid multibyte char (US-ASCII) expecting keyword_end content = “%PDF-#{@version}\\n%âãÏÓ\\n” Rails 3

此生再无相见时 提交于 2019-12-05 21:39:14
I have a problem with the pdf-writer gem on a collaborative project I'm trying to run, I'm using RVM , Ruby 1.9.2p180 , Rails 3.1.0 on Ubuntu 10.10 . I created a new gemset to install the required gems with Bundler, but when I try to run the app I get the fallowing error; josethernandezc@DG965WH:~/Desktop/conest31$ rails s /home/josethernandezc/.rvm/gems/ruby-1.9.2-p180@conest31/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:240:in `require': /home/josethernandezc/.rvm/gems/ruby-1.9.2-p180@conest31/gems/pdf-writer-1.1.8/lib/pdf/writer.rb:712: invalid multibyte char (US-ASCII)

How to reduce memory consumption of PdfPTable with many cells

北战南征 提交于 2019-11-27 02:12:28
I'm creating a PDF using ITextSharp which is composed of a single PdfTable. Unfortunately for a particular data set, I'm getting an Out of memory Exception due to the large number PdfPCells that are created (I've profiled the memory usage - I've got nearly 1/2 a million cells !) Is there any way to reduce the memory usage in such a case? I've tried flushing at various points (after each row) and full compression The PdfWriter is based on a FileStream Code looks a pretty much like this: Document document = Document(); FileStream stream = new FileStream(fileName,FileMode.Create); pdfWriter =

How to reduce memory consumption of PdfPTable with many cells

最后都变了- 提交于 2019-11-26 10:00:59
问题 I\'m creating a PDF using ITextSharp which is composed of a single PdfTable. Unfortunately for a particular data set, I\'m getting an Out of memory Exception due to the large number PdfPCells that are created (I\'ve profiled the memory usage - I\'ve got nearly 1/2 a million cells !) Is there any way to reduce the memory usage in such a case? I\'ve tried flushing at various points (after each row) and full compression The PdfWriter is based on a FileStream Code looks a pretty much like this: