Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
4695
Export Report in PDF (Avery 5160)
posted

Dear all,

I am going to print the labels in format Avery 5160 which is not A4 size. I am using below code but found that the PDF output got distorted. Do you have any similar experience or do you have any suggestions to do with avery 5160 format??

 

Report report = new Report();
                        ISection section = report.AddSection();
                        section.PageSize = new PageSize(PAGEWIDTH, PAGEHEIGHT);
                        section.PageMargins.Left = LEFTMARGIN;
                        section.PageMargins.Top = TOPMARGIN;
    
                        IGrid grid = section.AddGrid();
..............................................................................
   string dest = "";
                             dest = StoreManager.Common.CM_Param.COMMON_PRINT_PATH + reportName + ".pdf";
                             report.Publish(dest, FileFormat.PDF);
                            
                             BaseMainPanel bmp = new UserControls.BaseMainPanel();

                             if (bmp.printProcess == null || bmp.printProcess.HasExited)
                                 bmp.printProcess = System.Diagnostics.Process.Start(dest);
                             else
                             {
                                 BaseMainPanel.ShowWindow(bmp.printProcess.MainWindowHandle, StoreManager.Common.CM_ID.SW_SHOW);
                                 BaseMainPanel.SetForegroundWindow(bmp.printProcess.MainWindowHandle);
                             }

Parents
No Data
Reply
  • 48586
    posted

    Hello ,

     

    I have test your code snippet, please see the attached sample, but I am not sure that I see the issue. What you mean with  PDF output got distorted” ? Could you please be more specific in describing of your issue ? could you please let me know what are you expect to have in the output PDF ?

     

    I am waiting for your details.

    ReportCustomSize.zip
Children
No Data