waybillPrintPage.aspx.cs 2.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. using SiteCore;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Web;
  7. using System.Web.UI;
  8. using System.Web.UI.WebControls;
  9. using Utils;
  10. public partial class waybillPrintPage : System.Web.UI.Page
  11. {
  12. protected void Page_Load(object sender, EventArgs e)
  13. {
  14. string valuestr = CommonHelper.GetString("value");
  15. StringBuilder str = new StringBuilder();
  16. str.AppendLine("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
  17. str.AppendLine("<layout xmlns=\"http://cloudprint.cainiao.com/print\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://cloudprint.cainiao.com/print http://cloudprint-docs-resource.oss-cn-shanghai.aliyuncs.com/lpml_schema.xsd\" xmlns:editor=\"http://cloudprint.cainiao.com/schema/editor\" id=\"CUSTOM_AREA\" width=\"100\" height=\"40\" left=\"0\" top=\"140\">");
  18. str.AppendLine("<layout editor:_for_=\"1511229542957739\" id=\"1511229542958131\" style=\"zIndex:1;font-size:18px;font-weight:bold;\">");
  19. str.AppendLine(" <text style=\"fontFamily:SimHei;fontSize:10;align:center;\">");
  20. str.AppendLine(" <![CDATA[" + valuestr + "]]>");
  21. str.AppendLine(" </text>");
  22. str.AppendLine("</layout>");
  23. //str.AppendLine("<layout editor:_for_=\"1514858446271723\" id=\"1514858446272424\" width=\"66.4\" height=\"99.6\" left=\"43.6\" top=\"60.4\" style=\"zIndex:2;\">");
  24. //str.AppendLine(" <image src=\"http://cdn-cloudprint.cainiao.com/waybill-print/cloudprint-imgs/ca18230e391b7a29b3a90b9d73f572d2.jpg\" />");
  25. //str.AppendLine("</layout>");
  26. //str.AppendLine("<layout editor:_for_=\"1516348625422440\" id=\"1516348625428321\" width=\"40\" height=\"24\" left=\"44.66\" top=\"9.74\" style=\"zIndex:3;\">");
  27. //str.AppendLine(" <barcode type=\"code128\" style=\"opacity:1;hideText:true;rotation:90\" ratioMode=\"keepRatio\"><![CDATA[]]></barcode>");
  28. //str.AppendLine("</layout>");
  29. str.AppendLine("</layout>");
  30. Response.Clear();
  31. Response.Write(str.ToString());
  32. Response.End();
  33. }
  34. }