public Boolean ExportToPdf(DTO_Template template, Boolean forWebDownload, String webFileName, Boolean saveToFile, String storeFileName, Boolean openCloseConnection, System.Web.HttpResponse webResponse, System.Web.HttpCookie cookie) { //DTO_Settings Sett1 = (DTO_Settings)template.Settings.Clone(); //DTO_Settings Sett2 = (DTO_Settings)template.Settings.Clone(); Boolean response = false; iTextSharp5.text.Document doc = null; _template = template; if (forWebDownload) { //doc = WebExport(openCloseConnection, webFileName, template.Settings, webResponse, cookie, template.Signatures); doc = WebExport(openCloseConnection, webFileName, template.Settings, webResponse, cookie, template.Signatures, ""); if (doc == null) { GetErrorDocument(openCloseConnection, false, webFileName, webResponse, cookie, template.Settings, template.Signatures); return(false); } else if (saveToFile && !String.IsNullOrEmpty(storeFileName)) { //SavePDFtoFile(storeFileName, template.Settings, template.Signatures); SavePDFtoFile(storeFileName, template.Settings, template.Signatures); } } else if (saveToFile && !String.IsNullOrEmpty(storeFileName)) { doc = SavePDFtoFile(storeFileName, template.Settings, template.Signatures); } if (!response) { response = (doc != null); } return(response); }
public Boolean ExportToPdf( DTO_Template Template, String clientFileName, System.Web.HttpResponse webResponse, System.Web.HttpCookie cookie) { if (Template == null) { return(false); } _template = Template; webResponse.Clear(); //Render effettivo... try { base.WebExport(clientFileName, _template.Settings, webResponse, cookie, Template.Signatures); webResponse.End(); } catch (Exception ex) { string err = ex.ToString(); //DEBUG! return(false); } return(true); }
public Boolean ExportToFile(DTO_Template template, String storeFileName) { iTextSharp5.text.Document doc = null; _template = template; if (!String.IsNullOrEmpty(storeFileName)) { doc = SavePDFtoFile(storeFileName, template.Settings, template.Signatures); } return(doc != null); }
public iTextSharp5.text.Document GetErrorDocument(DTO_Template template, Boolean openCloseConnection, Boolean addContentDisposition, String fileName, System.Web.HttpResponse webResponse, System.Web.HttpCookie cookie) { if (template == null) { template = new DTO_Template(); } _template = template; return(GetErrorDocument(openCloseConnection, addContentDisposition, fileName, webResponse, cookie)); }
public DTO_Template DocTemplateUpdate(DTO_Template source, Int64 TemplateId, Int64 VersionId, string BasePath) { DTO_Template template = _DtService.TemplateGet(TemplateId, VersionId, BasePath); if (template == null) { return(source); } if (template.UseSkinHeaderFooter) { template.Header = source.Header; template.Footer = source.Footer; } return(template); }