Skip to content
Discussion options

You must be logged in to vote

Hello @yousefsedikdar ,

that is a good catch. We have a wrapper for the single PDF:
await conClient.Report.SaveReportPdfAsync(conClient.ActiveProjectId, 1, "Report.pdf");

but not for multiple. I will add it to the next client version.
As a workaround you can use this code:

await conClient.Project.OpenProjectAsync(filePath);
var connections = await conClient.Connection.GetConnectionsAsync(conClient.ActiveProjectId);

byte[] array = (byte[])(await conClient.Report.GeneratePdfForMutlipleWithHttpInfoAsync(conClient.ActiveProjectId, 
	connections.Select(x => x.Id).ToList(),
	"application/octet-stream")).Data;

using FileStream fileStream = File.Create("Sample.pdf");
await fileStream.WriteAsync…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@yousefsedikdar
Comment options

Answer selected by TomKohoutek
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants