Print PDF document using Aspose.PDF for .NET - Color of PDF is different than Adobe Reader print

adobe reader and aspose print have different color as attached image…!!!

Different Color.jpg (524.1 KB)

@jusondnp

Would you please confirm if you are using latest version of the API i.e. Aspose.PDF for .NET 20.4. In case you are still experiencing the issue, please share your sample PDF document with us. We will test the scenario in our environment and address it accordingly.

Different Color.pdf (585.9 KB)
This is the PDF document

@jusondnp

We have tested the scenario in our environment using Aspose.PDF for .NET 20.4 and were unable to notice the issue. Would you kindly share the code snippet that you are using to print the PDF document along with some screenshots showing the difference between colors.

PrintByAdobe.pdf (334.2 KB)
PrintByAspose.pdf (187.7 KB)

Printing Source is below

                    // Create PdfViewer object
                    PdfViewer viewer = new PdfViewer();

                    // Open input PDF file
                    viewer.BindPdf(dataDir + @"\" + name + ext);

                    // Set attributes for printing
                    //viewer.AutoResize = true;         // Print the file with adjusted size
                    //viewer.AutoRotate = true;         // Print the file with adjusted rotation
                    viewer.AutoResize = true;         // Print the file with adjusted size
                    viewer.AutoRotate = false;         // Print the file with adjusted rotation
                    viewer.PrintPageDialog = false;   // Do not produce the page number dialog when printing
                    //viewer.HorizontalAlignment = Aspose.Pdf.HorizontalAlignment.Justify;
                    //viewer.HorizontalAlignment = Aspose.Pdf.HorizontalAlignment.Center;

                    // Create objects for printer and page settings and PrintDocument
                    //System.Drawing.Printing.PrinterSettings ps = new System.Drawing.Printing.PrinterSettings();
                    //System.Drawing.Printing.PrintDocument prtdoc = new System.Drawing.Printing.PrintDocument();

                    // Set printer name
                    //ps.PrinterName = prtdoc.PrinterSettings.PrinterName;

                    // Set PageSize (if required)
                    pgs.PaperSize = new System.Drawing.Printing.PaperSize("A4", 827, 1169);
                    //pgs.Margins = new System.Drawing.Printing.Margins((int)(13.5/25.4*50), (int)(13.5 / 25.4 * 50), (int)(13.5 / 25.4 * 50), (int)(13.5 / 25.4 * 50));
                    pgs.Margins = new System.Drawing.Printing.Margins(0, 0, 0, 0);

                    //int width = (int)(210 * 25.4 * 72);

                    //int height = (int)(297 * 25.4 * 72);

                    //Document document = new Document(dataDir + @"\" + name + ext);
                    //double height = document.Pages[1].GetPageRect(false).Height;
                    //double width = document.Pages[1].GetPageRect(false).Width;

                    //pgs.PaperSize = new System.Drawing.Printing.PaperSize("A4", (int)width, (int)height);
                    //pgs.PaperSize = new System.Drawing.Printing.PaperSize("A4", 827, 1169);

                    // Set PageMargins (if required)
                    //pgs.Margins = new System.Drawing.Printing.Margins((int)(13.5/25.4*100), (int)(13.5 / 25.4 * 100), (int)(7.5 / 25.4 * 100), (int)(7.5 / 25.4 * 100));

                    //viewer.HorizontalAlignment = Aspose.Pdf.HorizontalAlignment.Center;
                    //viewer.VerticalAlignment = Aspose.Pdf.VerticalAlignment.Center;

                    label1.Text = "";

                    label1.Text = "[Printing..." + "(" + k.ToString() + ")] " + name + ext;
                    label1.Refresh();

                    // ExStart:PrintDialog
                    if (k == 1)
                    {
                        System.Windows.Forms.PrintDialog printDialog = new System.Windows.Forms.PrintDialog();
                        if (printDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                        {
                            ps = printDialog.PrinterSettings;
                            ps.Copies = m;
                            //ps.PrinterName = ps.PrinterName;

                            // Document printing code goes here
                            // Print document using printer and page settings
                            viewer.PrintDocumentWithSettings(pgs, ps);
                        }
                        else
                        {
                            Status = "CANCEL";
                            break;
                        }
                    }
                    else
                    {
                        ps.Copies = m;
                        viewer.PrintDocumentWithSettings(pgs, ps);
                    }

                    // Check the print status
                    if (viewer.PrintStatus != null)
                    {
                        // An exception was thrown
                        Exception ex = viewer.PrintStatus as Exception;

                        if (ex != null)
                        {
                            // Get exception message
                            MessageBox.Show(ex.Message);
                        }
                    }
                    else
                    {
                        // No errors were found. Printing job has completed successfully
                        Console.WriteLine("printing completed without any issue..");
                    }
                    // Print document using printer and page settings
                    //viewer.PrintDocumentWithSettings(pgs, ps);

                    // Close the PDF file after priting
                    viewer.Close();

@jusondnp

Thanks for sharing the sample code snippet.

As requested earlier, would you also share a screenshot showing the difference between colors. Kindly share the printer details as well that you are using at your side.

Printer Setting Image !!!

KakaoTalk_20200420_162742792.jpg (2.6 MB)
KakaoTalk_20200420_162742792_01.jpg (2.6 MB)
KakaoTalk_20200420_162742792_02.jpg (2.8 MB)
KakaoTalk_20200420_162742792_03.jpg (2.7 MB)
KakaoTalk_20200420_162742792_04.jpg (2.5 MB)
KakaoTalk_20200420_162742792_05.jpg (2.5 MB)
KakaoTalk_20200420_162742792_06.jpg (2.6 MB)
KakaoTalk_20200420_162742792_07.jpg (2.4 MB)
KakaoTalk_20200420_162742792_08.jpg (2.5 MB)
KakaoTalk_20200420_162742792_09.jpg (2.4 MB)
KakaoTalk_20200420_162742792_10.jpg (2.4 MB)
KakaoTalk_20200420_162742792_11.jpg (2.4 MB)
KakaoTalk_20200420_162742792_12.jpg (2.4 MB)
KakaoTalk_20200420_162742792_13.jpg (2.4 MB)
KakaoTalk_20200420_162742792_14.jpg (2.4 MB)
KakaoTalk_20200420_162742792_15.jpg (2.4 MB)
KakaoTalk_20200420_162742792_16.jpg (2.3 MB)
KakaoTalk_20200420_162742792_17.jpg (2.5 MB)
KakaoTalk_20200420_162742792_18.jpg (2.7 MB)

@jusondnp

Thanks for sharing all the details.

We have logged an investigation ticket as PDFNET-48041 in our issue tracking system for the issue that you have mentioned. We will further look into its details and keep you posted with the status of its correction. Please be patient and spare us some time.

We are sorry for the inconvenience.

When will the issue as PDFNET-48041 be completed???

@jusondnp

The issue has been logged under free support model and it will be investigated/resolved on first come first serve basis. We will surely inform you as soon as we make some significant progress towards its resolution. Please spare us some time.