PdfDocument IsReadOnly not honored

PdfDocument IsReadOnly not honored

Forum member · May 9, 2008
I'm loading a PDF into a PdfDocument, and then loading that into a MergeDocument so that I can add some additional fields. The problem that I'm running into is that the original PDF has some fields which are readonly. Once I load the PDF into the MergeDocument, those settings are lost. Is there a solution or work around for this? My code is below: byte[] form = workitemsService.GetFormPdf(WorkitemId); MergeDocument mergeDocument = new MergeDocument(formsDocument, MergeOptions.All); mergeDocument.Form.NeedsAppearances = true; ceTe.DynamicPDF.PageElements.Forms.Button btnSubmit = new ceTe.DynamicPDF.PageElements.Forms.Button("btnSubmit", 0, 0, 100, 25); btnSubmit.Behavior = Behavior.Push; btnSubmit.Label = "Save"; btnSubmit.Action = new SubmitAction(String.Format("http://{0}{1}", Request.Url.Host, ResolveUrl("SaveForm.aspx"))); mergeDocument.Pages[0].Elements.Add(btnSubmit); MemoryStream ms = new MemoryStream(); mergeDocument.Draw(ms); Response.ClearHeaders(); Response.AppendHeader("content-disposition", String.Format("attachment; filename={0}", "Forms.pdf")); Response.ContentType = "application/pdf"; ms.WriteTo(Response.OutputStream); Thanks for any assistance you can provide.

Re: PdfDocument IsReadOnly not honored

Support · May 9, 2008
Hello, Can you please send over the original PDF document and the code you are using to our [^a|mailto:support@cete.com|Support Team^] so that they can look into it further. Thanks, ceTe Software Support Team.