Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - Printing PDF Files Shows Some Wierd Lines
  FAQ FAQ  Forum Search   Register Register  Login Login

Printing PDF Files Shows Some Wierd Lines

 Post Reply Post Reply
Author
Message
m_alam View Drop Down
Team Player
Team Player
Avatar

Joined: 02 Aug 11
Location: Bangladesh
Status: Offline
Points: 40
Post Options Post Options   Thanks (0) Thanks(0)   Quote m_alam Quote  Post ReplyReply Direct Link To This Post Topic: Printing PDF Files Shows Some Wierd Lines
    Posted: 27 Nov 23 at 4:17PM
Greetings,
this is first time i am facing such kin of issues. Printing pdf files using qpl shows some wired lines which is not in the original pdf file.

here is the original pdf files:
https://mdsma.net/7426-28.pdf

and here is how it looks like after printing:
https://mdsma.net/a.pdf

and here is the code that i used to print the pdf file:
        public void PrintPDFFile(string pdfFile, double dblPWidth, double dblPHeight, int intCopies)
        {
            int intPrintOPT;
            string strCustomPrinter;
            string dllFile = isIDE ? @"d:\My Work\Visual Studio\DLL.NET\QPL\DLL\DebenuPDFLibraryDLL1811.dll" : $@"{exePath}\DebenuPDFLibraryDLL1811.dll";
            DPL_v1811.PdfModule pdfLib = new DPL_v1811.PdfModule(dllFile, dplKey);
            pdfLib.LoadFromFile(pdfFile, "");
            int docId = pdfLib.SelectedDocument();
            pdfLib.NormalizePage(0);
            pdfLib.CombineContentStreams();
            intPrintOPT = pdfLib.PrintOptions(0, 0, Application.ProductName);
            strCustomPrinter = GetCustomPrinterConfig(ref pdfLib, dblPWidth, dblPHeight, intCopies);
            pdfLib.PrintDocument(strCustomPrinter, 1, pdfLib.PageCount(), intPrintOPT);
            pdfLib.RemoveDocument(docId);
            pdfLib.ReleaseLibrary();
        }

        private string GetCustomPrinterConfig(ref DPL_v1811.PdfModule objRPDF, double dblPageWidth, double dblPageHeight, int intCopies)
        {
            string strPrinterConfig;
            int intWidth, intHeight, intLayout;
            intWidth = (int)Math.Round(25.4d * dblPageWidth * 10d);
            intHeight = (int)Math.Round(25.4d * dblPageHeight * 10d);
            intLayout = intWidth < intHeight ? 1 : 2;
            intLayout = 1;
            strPrinterConfig = objRPDF.NewCustomPrinter(objRPDF.GetDefaultPrinterName());
            objRPDF.SetupCustomPrinter(strPrinterConfig, 1, 0); // REM custom paper size
            objRPDF.SetupCustomPrinter(strPrinterConfig, 2, intHeight); // REM custom paper height
            objRPDF.SetupCustomPrinter(strPrinterConfig, 3, intWidth); // REM custom paper width
            objRPDF.SetupCustomPrinter(strPrinterConfig, 4, intCopies); // REM number of copies
            objRPDF.SetupCustomPrinter(strPrinterConfig, 5, 300); // REM quality 1 = high, 2 = medium, 3 = low, 4 = draft, Or Exact DPI
            objRPDF.SetupCustomPrinter(strPrinterConfig, 6, 2); // REM Color 1 = monochrome, 2 = Color
            objRPDF.SetupCustomPrinter(strPrinterConfig, 11, intLayout); // REM 1 = portrait, 2 = landscape
            return strPrinterConfig;
        }
and following line call the print funcion:
PrintPDFFile(filePath, 8.50, 11, 3);


andy if i just print the pdf file manually then there is not those lines, all smooth and just like the original file.

any help please?

best regards


Edited by m_alam - 27 Nov 23 at 4:20PM
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 27 Nov 23 at 7:39PM
Hi Hassan :) 

Source was a form i think.
I've made the same experiences as you did.
I've tried some of my preview functions and could see the same behavior without printing.
You can render the pdf to an image and you'll see these lines as well - due to this i don't think that the reason ist the printing functionality.
It seems to me that there are additional boxes behind the framed boxes with different dimensions?
The common readers with large dlls in their installation can do better error correction and layout alignment than QuickPDF can do.

Cheers,
Ingo

Back to Top
m_alam View Drop Down
Team Player
Team Player
Avatar

Joined: 02 Aug 11
Location: Bangladesh
Status: Offline
Points: 40
Post Options Post Options   Thanks (0) Thanks(0)   Quote m_alam Quote  Post ReplyReply Direct Link To This Post Posted: 29 Nov 23 at 4:45AM
Originally posted by Ingo Ingo wrote:

Hi Hassan :) 

Source was a form i think.
I've made the same experiences as you did.
I've tried some of my preview functions and could see the same behavior without printing.
You can render the pdf to an image and you'll see these lines as well - due to this i don't think that the reason ist the printing functionality.
It seems to me that there are additional boxes behind the framed boxes with different dimensions?
The common readers with large dlls in their installation can do better error correction and layout alignment than QuickPDF can do.



yes you are right. source is a pdf form.. so, point of your views.. there is nothing we qpl can do to fix it?
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 29 Nov 23 at 8:41PM
for me it seems to be a special issue with a sloppy made form.
The slim line library QuickPDF won't be able to fix this issue.
Sorry.

Cheers,
Ingo

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store