Hello,
When i try to export to PDF on web project, return the follow error:
“'No project exists with the specified file name.”
My code:
smartLabelCommon._listLabel = new ListLabel();
smartLabelCommon._llProject = GetLayoutType(layout.LayoutType.ToLower());
smartLabelCommon._listLabel.DataBindingMode = DataBindingMode.Preload;
smartLabelCommon._listLabel.AutoProjectType = smartLabelCommon._llProject;
smartLabelCommon._listLabel.AutoDestination = LlPrintMode.Export;
smartLabelCommon._listLabel.FileRepository = DefaultSettings.GetBaseRepository();
smartLabelCommon._listLabel.AutoProjectFile = "repository://{" + json.LayoutID + "}";
// Set export options
smartLabelCommon._listLabel.ExportOptions.Add(LlExportOption.ExportTarget, "PDF");
smartLabelCommon._listLabel.ExportOptions.Add("Export.File", $"{guid}.pdf");
smartLabelCommon._listLabel.ExportOptions.Add("Export.Path", $"{pathToJsons}/PDF/");
smartLabelCommon._listLabel.ExportOptions.Add("Export.Quiet", "1");
smartLabelCommon.SetTypeToWork();
if (!string.IsNullOrEmpty(json.Json))
smartLabelCommon.AddDataSource(json.Json);
smartLabelCommon.AddFuncionsToLL(string.Empty);
Stream doc = new MemoryStream();
smartLabelCommon._listLabel.Print(smartLabelCommon._llProject, GenerateStreamFromString(layout.LayoutTemplate));
Someone know why?
Best regart’s,
Tiago Martins.