PDF printing issue

Discussions about document printing in GdPicture.NET using GdPictureImaging.
Post Reply
boyan
Posts: 8
Joined: Mon Jan 11, 2010 4:53 am

PDF printing issue

Post by boyan » Thu Jan 28, 2010 12:50 am

Hi,
I came across two issues when printing pdf file, using GdPicture.Net SDK.
Using version 6.5 to print the attached pdf file on A3 printer, the content was moved towards right and bottom and the right border and the bottom border was cut off. There is no problem printing the attached pdf file using Acrobat Reader.
Using version 6.6 to print the attached pdf file, the clipspec logo image at the left bottom was dropped off completed.

My code is:

Code: Select all

internal static void PrintPDF(PrinterSettings ps, string pdfFile, string documentName, bool landscape, PaperSize paperSize)
        {
            using (var pdfView = new GdPicture.GdViewer())
            {
                pdfView.EnableMenu = false;
                ps.DefaultPageSettings.PaperSize = paperSize;
                pdfView.LockViewer = false;
                pdfView.SilentMode = true;
                pdfView.PrintSetShowPrintingProgress(false);
                pdfView.BorderStyle = System.Windows.Forms.BorderStyle.None;
                pdfView.SetLicenseNumber("xxxxx"); //  Please replace XXXX by a valid demo or commercial license KEY
                pdfView.DisplayFromFile(pdfFile);
                pdfView.PrintSetActivePrinter(ps.PrinterName);
                pdfView.PrintSetPrinterSettings(ps);
                pdfView.PrintSetOrientation(landscape? GdPicture.PrinterOrientation.PrinterOrientationLandscape : 
                                            GdPicture.PrinterOrientation.PrinterOrientationPortrait );
                pdfView.PrintSetPaperSize(paperSize);
                pdfView.PrintSetDocumentName(documentName);
                pdfView.PrintSetFromToPage(0, pdfView.PageCount);
                pdfView.Print();
                pdfView.CloseDocument();
            }
        }
Could you please help solve these issues, especially the offset one?

Thank you!
-Bo
Attachments
bd48fe1d.zip
(70.17 KiB) Downloaded 209 times

User avatar
Loïc
Site Admin
Posts: 5570
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: PDF printing issue

Post by Loïc » Thu Jan 28, 2010 9:33 am

Hi Bo,

The logo problem has been identified and fixed.

For your printing issue I can't help you with your code: it includes some variable which come from other part.

Please, give us a code we can run with simple copy/paste.

Thank you for your comprehension.

Kind regards,

Loïc

boyan
Posts: 8
Joined: Mon Jan 11, 2010 4:53 am

Re: PDF printing issue

Post by boyan » Sun Jan 31, 2010 11:50 pm

Hi Loic,
Thank you very much for your quick fixing. I have uploaded a .Net solution (requires VS2008 and .net 3.5SP1). Please copy the required 3 GdPicture.Net dll files to the project folder to run, as they are too big to upload. I am using the latest GdPicture.Net version 6.6.
When using this solution to print the attached PDF file to several hardware A3 printers, the bottom and right border were cut off. To print it to virtual printers such as PDFCreator, the margin is correct.
There is no problem to print that file using Acrobat reader. Could you please help me solve this issue asap?

Thank you!
-Bo

boyan
Posts: 8
Joined: Mon Jan 11, 2010 4:53 am

Re: PDF printing issue

Post by boyan » Mon Feb 01, 2010 8:04 am

There are more issues when printing the attached A3-1.pdf:
1. Masked out information are printed out using GdPicture library in previous uploaded test solution. When compared with the PDF viewed using Acrobat reader, lots of extra information appears on the bottom of printed hard copy.
2. The dotted connection lines are not printed exactly as in the pdf file.
3. Solid lines with arrows are not printed with the correct width/thickness.

Could you please solve these issues asap?

Thanks!
-Bo
Attachments
A3-1.zip
(827.23 KiB) Downloaded 214 times

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest