LL Web, export to PDF

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.

I’d create a log file with Debwin and search for the error “'No project exists with the specified file name.” Once you found it you could take a look at the sourroundings and maybe gather more information about the cause.

If you would like us to take a look at the log file, you are welcome to create a support case and upload the file.