Print Page | Close Window

QuickPDF compatability with Service based Apps

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: General Discussion
Forum Description: Discussion board for Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=3616
Printed Date: 22 Nov 24 at 7:43PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: QuickPDF compatability with Service based Apps
Posted By: kumarp11
Subject: QuickPDF compatability with Service based Apps
Date Posted: 09 Oct 18 at 10:56PM

We are using 11.15 version of quickPDF library. We are facing some issues where prints are coming blank. Could you please confirm that quickPDF library works fine with service based application? This will really help us.




Replies:
Posted By: Ingo
Date Posted: 10 Oct 18 at 7:02PM
Hi kumarp11,

if you're facing probs using 11.15 you'll get the same probs using 11.15 with a service based app.
What type of probs you have?
What's on the blank pages before printout?
Where's a code snippet to see how you're doing it?
Is it possible to show us a pdf with the probs so we could try by our own?
Did you already tried the actual test version?

Cheers and welcome here,
Ingo



-------------
Cheers,
Ingo



Posted By: kumarp11
Date Posted: 10 Oct 18 at 11:17PM
Thanks for the reply Ingo. We are using licensed version of 11.15. We are facing different kind of issues here. We are printing tickets and saving respective PDF files using QuickPDF.

1. Prints randomly will come out blank and if you print the same ticket again, it will print fine. Here is the code snippet..

                PDFLibrary quickPdf = _objQuickPdf as PDFLibrary;
                int result = quickPdf.LoadFromString(data, null); - Data here is a UTF-8 byte stream
                if (result != 1)
                {
                    //Log statement
                }
                if (quickPdf.NewPage() == 0)
                {
                    Log("The page could not be added");
                }
                int captureID = quickPdf.CapturePage(1);
                if (captureID == 0)
                {
                    Log("QuickPDF: The specified page does not exist, or it is the only page in the document");
          
                }
                if (quickPdf.SetOrigin(1) != 1)
                {
                    Log("QuickPDF: Failed to set origin for the new page");
                }
                quickPdf.SetMeasurementUnits(1);
                if (pageScaling.ToUpper() == "TRUE")
                {
                    double scaleFactor = scalePercentage;
                    double horizBorder = width * (1.0 - scaleFactor) / 2;
                    double vertBorder = height * (1.0 - scaleFactor) / 2;
                    if (quickPdf.DrawCapturedPage(captureID, horizBorder, vertBorder, width - 2 * horizBorder, height - 2 * vertBorder) == 0)
                    {
                        Log("QuickPDF: An invalid CaptureID was specified");
                    }
                }
                else
                {
                    if (quickPdf.DrawCapturedPage(captureID, xPosition, yPosition, width, height) == 0)
                    {
                        Log("QuickPDF: An invalid CaptureID was specified");
                    }
                }
                int iPrintOptions = quickPdf.PrintOptions(0, 0, ticketName);
                int printreturnvalue = quickPdf.PrintDocument(PrinterName, 1, 1, iPrintOptions);

2. Sometimes hardcopy prints are coming fine but the respective PDF on hardrive is being saved as blank PDF or misprinted PDF(only half of ticket content is there on PDF). Interesting thing here is that when you copy the byte stream in a text file and save it as .pdf file, PDF will look fine but when you save the same through application using quickPDF.Savetofile(), it will save pdf as blank or misprinted although the hardcopy print will be fine.

3. Sometimes we have seen that quickpdf.Printtodocument() will throw exception and we will see following in our log file "Exception writing PDF document.
System.Runtime.InteropServices.SEHException (0x80004005): External component has thrown an exception."
What can be the reason for this?

4. Sometimes quickpdf.LoadFromString() is not able to load a document and it does not return 1. What can be the reason for this?

Any help will really help us in tracking down the issue.


Posted By: kumarp11
Date Posted: 12 Oct 18 at 5:04PM
Hello,
One more question here

Could you please confirm if quickPDF is thread-safe and can be used in a threaded environment?

Thanks
Prashant



Posted By: Ingo
Date Posted: 13 Oct 18 at 12:14PM
Hi,

i confirm nothing - we're only users here ;-)
Please try the enhanced search functionality here (above, right, "search" with options)...



-------------
Cheers,
Ingo



Posted By: tfrost
Date Posted: 13 Oct 18 at 7:32PM
This is the type of question you may need to ask Debenu/Foxit support, with complete details of precisely what you hope to do.  You have asked about multi-threading, about service applications, and about printing; but more importantly you have also asked for "confirmation".  I, probably like other mere users in this forum, cannot give you confirmation, even if I knew more detail of how you will use the library.  Sorry! I have successfully used Quick PDF in multi-threaded applications, and in services, and for printing. But not all together, and definitely not in the way that may be in your desiqn!



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk