Notifications
Announcements
No record found.
Hy everyone,
Is there any code or library in X++ or C# which can reduce the size of SSRS report while generating PDF file through it?Thank you
*This post is locked for comments
If you search web using keywords like "reduce the file size through c# code" you will get plenty of results . I am not aware of any way through x++ but try searching c# code which might help you.
Hi Rashid,
Use iText to split and merge PDF.
Document doc = new Document(PageSize.A4, 50, 50, 25, 25);
pdfWriter writer = PdfWriter.GetInstance(doc, ms);
PdfContentByte contentPlacer;
writer.SetPdfVersion(PdfWriter.PDF_VERSION_1_5);
writer.CompressionLevel = PdfStream.BEST_COMPRESSION;
string pdfFile = @"D:\Test.pdf";
PdfReader reader = new PdfReader(pdfFile);
PdfStamper stamper = new PdfStamper(reader, new FileStream(@"D:\Test1.pdf", FileMode.Create), PdfWriter.VERSION_1_5);
stamper.FormFlattening = true;
stamper.SetFullCompression();
stamper.Close();
I hope it will help you.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 4 Most Valuable Professional
Priya_K 4
MyDynamicsNAV 2