Current filter:
                                You should refresh the page.
                                  • We are experiencing a problem with PDF documents that are created via exporting an XtraReport.  Randomly, Adobe Acrobat will be unable to open a PDF.  E.g. if we export 100 reports, 1 of the exported PDF's cause the error.  However, that same PDF can be opened by Chrome or FoxIt.  Also, if the same report is exported to a PDF again, the new PDF can be opened in Adobe Acrobat.

                                    Below is pared-down snipped the code we use to export the PDF:

                                    public MemoryStream XtraReportToMemoryStream(XtraReport report, ReportOutputTypes.ReportOutputType outputType, string password = null) { var result = new MemoryStream(); switch (outputType) { case ReportOutputTypes.ReportOutputType.Pdf: if (string.IsNullOrEmpty(password)) { report.ExportToPdf(result); } else { var pdfExportOptions = new PdfExportOptions(); pdfExportOptions.PasswordSecurityOptions.PermissionsOptions.EnableCopying = false; pdfExportOptions.PasswordSecurityOptions.PermissionsOptions.ChangingPermissions = ChangingPermissions.None; pdfExportOptions.PasswordSecurityOptions.PermissionsPassword = password; pdfExportOptions.PasswordSecurityOptions.OpenPassword = password; report.ExportToPdf(result, pdfExportOptions); } break; ... other cases removed... } result.Position = 0; return result; }

                                    I have searched the KB and found another similar issue: RichEditDocumentServer Export HTML to PDF, random password and decryption issues.

                                    After reviewing that thread, I did some research and found that the PDF's that are being created are version 1.7.  Seeing that the AES256 encryption may be the problem, I then added the following line of code to reduce the encryption level:

                                    pdfExportOptions.PasswordSecurityOptions.EncryptionLevel = PdfEncryptionLevel.AES128;

                                    The problem still occurs even using AES128 encryption.

                                    What else can I do to resolve this issue?

                                    Please let me know if you need any additional information.

                                1 Solution

                                Creation Date Importance Sort by

                                Hi Welton,
                                Thank you for reaching out to us. To resolve this issue, I suggest that you update the version of our components. Unfortunately, in the version you're using (17.2.6) there was indeed a hash calculating issue that may lead to broken PDF documents. It has been already fixed in the context of the following inquiry report: Encryption - The AES256 encryption algorithm sometimes incorrectly encrypts documents. Please grab a new build from your Download Manager (v.17.2.7) and let us know if it resolves the issue for you. To update project references, use the Project Convert tool.
                                We look forward to your results.


                                • Welton Maisenhelder 12.13.2018

                                  Updating to the latest 17.2 version successfully resolved the problem.  Thanks!