Error on pcltool.dll when a large number of files are processed

Hello!

We are using the Spool File Page Counter SDK on our print management service. Basically, we have a service and every time it intercepts a new print job, it analyzes its .SPL file.

So, we could have multiple threads accessing and using the SDK at the same time, it works well when there aren't a large number of files being processed.

But on our load/stress tests we usually send a large number of print jobs to the printers, that's when we are getting an error within the SDK, on the windows event viewer a pcltool.dll error can be found.

After the first error occurs, we will get the same problem every time we try to analyze a file, no matter how many files or its sizes.

I'm sending a print of the problem, I believe that is related to the amount of files that the SDK try to process, maybe a thread problem, as a many of them are using the SDK at the same time.

In our production version, we will most likely face this kind of environment, where a large number of files will be processed at the "same time".

Have you ever faced this kind of issue ? Is there a solution for this or a workaround that we could use?

Customer
---------------------------------------
here is the print of the error.

I forgot to mention but when this error occurs, the results of the SDK analyzes are all wrong.

image

Customer
---------------------------------------
Yes, I guess it may caused by multiple thread problem. In order to solve this problem completely, I guess the following two solutions may useful to you,

Solution 1:

If you are calling ReadInfo.dll library inside a multiple thread function in your source code, you may call ReadInfoFromAllFormats() function to parse all of your SPL files one by one, you may use a Global Value or a Mutex Object to avoid multiple thread call to ReadInfoFromAllFormats() function at same time, this problem will be solved completely.

Solution 2:

You can create a simple Command Line EXE application to call ReadInfoFromAllFormats() function from ReadInfo.dll library, then you can call this EXE application from your main EXE application, because this Command Line EXE application running inside another process space, so you can run multiple instances of this Command Line EXE application without any problem.

With this method, you could able to use "Spool File Page Counter SDK" to analyze more of your SPL files at same time.

We hoping above two solutions will useful to you, you may give them to try.

VeryDOC

---------------------------------------

After I sent the ticket to you, I thought another solution.

I guess this problem may caused by memory management mechanism between C# and C++, I have another solution for you to solve this problem quickly and completely.

This solution will work like below,

1. You may register FileInfoCOM.exe into your system by following command line with administrator privilege,

FileInfoCOM.exe /regserver

You can also run "install.vbs" to register FileInfoCOM.exe into your system automatically.

2. You can use FileInfoCOM.exe to instead of ReadInfo.dll DLL library, you can call FileInfoCOM.exe from C# by following sample source code,

--------------------
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using FileInfoCOM;

namespace ParsingTest {
    class Program {

        static void Main(string[] args)
        {
            if (args.Length != 1)
            {
                Console.WriteLine("test.exe C:\\test.pcl");
                Console.WriteLine("test.exe C:\\test.ps");
                return;
            }
            Console.Write("args length is ");
            Console.WriteLine(args.Length); // Write array length
            for (int i = 0; i < args.Length; i++) // Loop through array
            {
                string argument = args[i];
                Console.Write("args index ");
                Console.Write(i); // Write index
                Console.Write(" is [");
                Console.Write(argument); // Write string
                Console.WriteLine("]");
            }
            string fileName = args[0];
            int bIsRenderToPDF = 0;
            int bwPageCount = 0;
            int colorPageCount = 0;
            int copyCount = 0;
            double nPageWidth = 0;
            double nPageHeight = 0;
            string strPaperSizeName = new string(' ', 300);

            FileInfoCOM.FileInfoClass objFileInfoCom = new FileInfoCOM.FileInfoClassClass();

            objFileInfoCom.com_ReadInfoSetCode("XXXXXXXXXXXXXXXXXX");
            objFileInfoCom.com_ReadInfoFromPCLFile(fileName, bIsRenderToPDF, ref bwPageCount, ref colorPageCount,
                    ref copyCount, ref nPageWidth, ref nPageHeight, ref strPaperSizeName);

            Console.WriteLine(String.Format("File: {0}", fileName));
            Console.WriteLine(String.Format("Render To PDF: {0}", bIsRenderToPDF));
            Console.WriteLine(String.Format("BW Pages: {0}", bwPageCount));
            Console.WriteLine(String.Format("Color Pages: {0}", colorPageCount));
            Console.WriteLine(String.Format("Width: {0}", nPageWidth));
            Console.WriteLine(String.Format("Height: {0}", nPageHeight));
            Console.WriteLine(String.Format("Paper name: {0}", strPaperSizeName));
        }
    }
}
--------------------

3. You may call "FileInfoCOM.FileInfoClass objFileInfoCom" from a multiple thread function to parse more SPL files at same time, you can use this method to check if you could parse more SPL files from C# multiple threads properly.

Because "FileInfoCOM.exe" is another EXE process, it does use a different memory management mechanism compare to C# process, I guess the "FileInfoCOM.exe" will able to solve this problem to you too.

VeryDOC

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)
Posted in PCL, PS, PDF Page Counter | Tagged , , , , , | Leave a comment

Error at FileInfoCOM.exe when I try to count the page number from SPL, PCL, PDF, PS, SPL-EMF, Spool files by Spool File Page Counter SDK

Hello,

We are using the Spool File Page Counter SDK in one of our projects.
Basically, we're monitoring the windows print spooler and every time that a new print job is identified, the application gets its respective .SPL file and process it through your SDK.
We are getting an error in this process though, for some reason the SDK is not being able to process some .SPL file and crashes the windows spoolsv.exe, as the file is kept in the SDK process.

Here is the log from windows event viewer that revealed the error:

Faulting application name: FileInfoCOM.exe, version: 1.0.0.0, time stamp: 0x59093997
Faulting module name: ReadInfo.dll, version: 1.0.0.1, time stamp: 0x5c9e7533
Exception code: 0xc0000005
Fault offset: 0x00004da0
Faulting process id: 0x26f8
Faulting application start time: 0x01d4f92f883a560c
Faulting application path: C:\Program Files (x86)\NetClientService\FileInfoCOM.exe
Faulting module path: C:\Program Files (x86)\NetClientService\ReadInfo.dll
Report Id: bdeaec7e-6523-11e9-a3f6-000c2931ae13
Faulting package full name: %14
Faulting package-relative application ID: %15

My question is: Have you guys faced this kind of issue before? Is this a well know behavior or not ?

Thank you! 
Customer
------------------------------

image
We suggest you may download the latest version of Spool File Page Counter SDK from our website to try again,

https://www.verydoc.com/spool-page-count.html
http://www.verydoc.com/ps-and-pcl-info-sdk.zip

If you still have same problem with the latest version of Spool File Page Counter SDK product, please feel free send to us your sample SPL file for test purpose, after we check your sample SPL file, we will figure out a solution to you asap.

VeryDOC

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)
Posted in PCL, PS, PDF Page Counter | Tagged , , , , , | Leave a comment

AutoCAD DWG and DXF to PDF Converter v2.2 failed to convert my DWG files to PDF files

I finally got the files to add. I've clicked all the filenames and one of them and then clicked the "Make pdf" button, named the file in the place I want it but nothing ever shows up. How do I get these files to convert so I can see if we want to purchase this program?

image

Customer
-------------------------------------------
Thanks for your sample DWG files, we will test with AutoCAD DWG and DXF to PDF Converter v2.2 shortly. In the meantime, we suggest you may download VeryDOC DWG to Vector Converter Command Line from our website to try, DWG to Vector Converter Command Line does support all versions of DWG formats, we hope this product will work better to you.

btw, I just tested these DWG files with VeryDOC DWG to Vector Converter Command Line software, these DWG files can be converted to PDF files without any problem, you may download VeryDOC DWG to Vector Converter Command Line from this web page and try it by yourself,

https://www.verydoc.com/dwg-to-vector.html
http://www.verydoc.com/verydoc_dwg2vector_cmd.zip

after you download it and unzip it to a folder, you can run following command line to batch convert all of your DWG files to PDF files properly,

dwg2vec.exe D:\downloads\*.dwg

Please look at following screenshot for a PDF file which converted from your DWG file,

image

VeryDOC
-------------------------------------------

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)
Posted in DWG to PDF Converter, DWG to Vector Converter | Tagged , , , , | Leave a comment

Regarding Subscription to PDF Editor OCX controls (AxPDFOCXLib library) from C# source code

Hi Team,

Good Morning...!!!

We are in development of some .Net applications for our clients and have a requirement of disabling Print/SaveAs options in PDF files.

We have studied and analysed about your tool PDF Editor OCX ActiveX services for PDF which is almost meets our requirement and decided to take the subscription to it.

But before that we need to clarify some queries regarding ActiveX control and small demo on how it integrates and works.

So, could you please provide us specific point of contact from your team who can help us on the same?

Customer
--------------------------------------


Thanks for your message, we suggest you may download the trial version of PDF Editor OCX Control (ActiveX) Developer License $2999.00 from this web page to try,

http://www.verypdf.com/app/pdf-editor/try-and-buy.html#buy-dev
http://www.verypdf.com/pdf-editor/pdfeditor_ocx.zip

This demo package contains VB, VC, C# and VB.NET examples, you can compile and run these demo projects easily.

We have also PDF Viewer OCX Control (ActiveX) which can be used to view PDF files only, you may download PDF Viewer OCX Control from this web page to try,

http://www.verypdf.com/dl2.php/pdfviewerocx.zip

If you encounter any problem with these products, please feel free to let us know, we will assist you asap.

VeryPDF
--------------------------------------
Hi Team,

Thanks for your response.

I've already downloaded your trial version of PDF Editor OCX Control (ActiveX) and tried, But I'm getting issue with "AxPDFOCXLib.dll" and "PDFOCXLib.dll" files
(Error CS0246 The type or namespace name 'AxPDFOCXLib' could not be found ). I've tried to copy the dll's from others projects which are available in your zip file but couldn't found. Tried by adding "AxInterop.PDFOCXLib.dll" and "Interop.PDFOCXLib.dll" files from PDFAnnotator-C# project but still no luck and also tried to download those dll's separately from your site or from internet but haven't found.

I've attached the screen shot of solution for your reference.

Could you please share those dll's with us? so that we can compile and run the trial version of PDF Editor OCX Control (ActiveX).

Regards,
Customer
--------------------------------------
You need run a CMD window with administrator privilege first, and run following command line to register pdfocx.ocx into your system,

regsvr32 pdfocx.ocx

after you register pdfocx.ocx successful, you will able to 'AxPDFOCXLib' properly.

VeryPDF

See Also:

http://www.verypdf.com/wordpress/201604/royalty-free-pdf-annotator-ocx-activex-control-for-c-and-net-developers-component-to-view-and-annotate-pdf-documents-42537.html

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)
Posted in PDF Editor | Tagged , | Leave a comment

xps2pdf as dll library, is there any way to package xps2pdf.exe as an application library (.dll)?

Hi, is there any way to package xps2pdf.exe as an application library (.dll)?

We have experienced several instances where users have antivirus software or other IT policies that quarantine/block xps2pdf.exe.

Thank you in advance!

Customer
--------------------------------------------

image
Thanks for your message, yes, we have a XPS2PDF SDK product, the cost of this XPS2PDF SDK Developer License is USD$2495, it's royalty free, you can purchase it from our website directly,

http://www.verypdf.com/dl2.php/xps2pdf_sdk.zip
https://www.verydoc.com/xps-to-pdf.html
http://www.verypdf.com/order2.php?s=102518&p=xpstopdfsdkdev&q=1&v=0&d=0

VeryDOC
--------------------------------------------
Thank you for this information.

Can you clarify what royalty free indicates?

Additionally, does the SDK product indicate that we obtain the source code and/or repository?

Customer
--------------------------------------------
>>Can you clarify what royalty free indicates?

Royalty free is mean that you need only pay one time, the cost is USD$2495, you needn't pay it every year, it's just one time fee.

>>Additionally, does the SDK product indicate that we obtain the source code and/or repository?

Thanks for your message, we don't provide the source code for the SDK product, we are provide only the DLL libraries.

VeryDOC
--------------------------------------------
Thanks for the clarification with my prior questions.

We are interested in purchasing the SDK if we can apply our prior purchase of the "1 Developer License" towards this purchase. Can this be done? We weren't aware of the SDK offering when we first made our purchase and can not purchase a new license. I hope this is something your team can understand.

Let me know, and thank you in advance,
Customer
--------------------------------------------
Thanks for your message, you can pay price difference to upgrade from XPS to PDF Converter Command Line Developer License to SDK Developer License, that's no problem.

VeryDOC
--------------------------------------------
Thanks for this answer.

Can you tell me what files are provided in the SDK? For instance, is it a native windows dll, or a .NET dll. If it is a .NET dll, what version of .NET does it target? Also are there any other files or code samples, and if so in which language are the code samples?

I’m asking because there isn’t a trial and I need to be sure we can incorporate it.

Thanks again,
Customer
--------------------------------------------
>>Can you tell me what files are provided in the SDK? For instance, is it a native windows dll, or a .NET dll. If it is a .NET dll, what version of .NET does it target?

Thanks for your message, the XPS to PDF Converter SDK contains following files,

1. xps2pdf.dll library,
2. xps2pdf.lib file, this is an interface file for xps2pdf.dll library,
3. xps2pdfcom.exe file, this is the COM interface file for xps2pdf.dll library, this COM can be called from both 32bit and 64bit systems.
4. C++, VB, C#, VB.NET, PHP, etc. demo projects.

The DLL is a native Windows DLL, it's not a .NET DLL.

>>Also are there any other files or code samples, and if so in which language are the code samples?

Yes, the SDK contains C++, VB, C#, VB.NET, PHP, etc. demo projects, you can compile and run these sample projects easily.

If you have any question, please feel free to let us know, we will assist you asap.
VeryDOC
--------------------------------------------
Thanks for these answers.

Our project is a c# application, and we are looking to remove all *.exe dependencies.

Can you confirm that we could simply include the *.dll and potentially *.lib file into our project without the need for the xps2pdfcom.exe? Can you also tell me if the C# sample provided works without xps2pdfcom.exe?

Thanks again!
Customer
--------------------------------------------
Yes, of course, you can simply include *.dll files into your project and without the need for the xps2pdfcom.exe, that's no problem.

Yes, you can call xps2pdf.dll library from C# project directly and without xps2pdfcom.exe.

You can download XPS to PDF Converter SDK from this URL,

http://www.verypdf.com/dl2.php/xps2pdf_sdk.zip

Please set your license key into the source code to remove the restrictions, for example,

+++++++++++++++++
private void button1_Click(object sender, EventArgs e)
{
string appPath = Path.GetDirectoryName(Application.ExecutablePath);
string strPDFFile = appPath + "\\sample\\test.xps";
string strOutFile = appPath + "\\_out_C#.pdf";
string strLicenseKey = "XXXXXXXXXXXXXXXXX";

string strCmd = "-$ " + strLicenseKey + " \"" + strPDFFile + "\" \"" + strOutFile + "\"";

System.Type VeryPDFType = System.Type.GetTypeFromProgID("VeryPDF.XPStoPDFCom");
VeryPDF.XPStoPDFCom VeryPDFCom = (VeryPDF.XPStoPDFCom)System.Activator.CreateInstance(VeryPDFType);
int nReturn = VeryPDFCom.XPStoPDF(strLicenseKey, strCmd);
MessageBox.Show("Converter finished.");
}
+++++++++++++++++

You can also call xps2pdfsdk.dll from your C++ source code directly, for example,

+++++++++++++++++
typedef int (__stdcall *VeryPDFXPS2PDFConverterFunc)(const char *lpszCmdLine);
typedef void (__stdcall *VeryPDFXPS2PDFSetCodeFunc)(const char *lpRegcode);
VeryPDFXPS2PDFConverterFunc lpVeryPDFXPS2PDFConverter = NULL;
VeryPDFXPS2PDFSetCodeFunc lpVeryPDFXPS2PDFSetCode = NULL;
BOOL XPS2PDFConverterSDK(const char *lpszLicenseKey, const char *lpszCmdLine)
{
if(lpszCmdLine == NULL || lpszCmdLine[0] == 0)
        return FALSE;

char szPath[_MAX_PATH];
GetModulePath(szPath,"xps2pdfsdk.dll");
HINSTANCE hXPS2PDFSDK = LoadLibrary(szPath);
if(hXPS2PDFSDK == NULL)
        return FALSE;

lpVeryPDFXPS2PDFConverter = (VeryPDFXPS2PDFConverterFunc)GetProcAddress(hXPS2PDFSDK, "VeryPDFXPS2PDFConverter");
if(lpVeryPDFXPS2PDFConverter == NULL)
        return FALSE;

lpVeryPDFXPS2PDFSetCode =(VeryPDFXPS2PDFSetCodeFunc)GetProcAddress(hXPS2PDFSDK, "VeryPDFXPS2PDFSetCode");
if(lpVeryPDFXPS2PDFSetCode ==NULL)
        return FALSE;

if(lpszLicenseKey && lpszLicenseKey[0] != 0)
        lpVeryPDFXPS2PDFSetCode(lpszLicenseKey);
int nResult = lpVeryPDFXPS2PDFConverter(lpszCmdLine);
FreeLibrary(hXPS2PDFSDK);
        return nResult;
}

XPS2PDFConverterSDK("XXXXXXXXXXXXXXXXX", "-$ XXXXXXXXXXXXXXXXX D:\test.xps D:\out.pdf");
+++++++++++++++++

If you encounter any problem with XPS to PDF Converter SDK, please feel free to let us know, we are glad to assist you asap.

VeryDOC
--------------------------------------------
Could you create an example c# console app (.NET 4.5+) that does not rely on the COM.exe?

None of the examples build or run for me, and I believe the above code is a c++ example.

Thanks in advance,
Customer
--------------------------------------------
Thanks for your message, we have created a new example C# console app (.NET 4.5+) that does not rely on the COM.exe for you, please download the new package from this URL,

http://www.verypdf.com/dl2.php/xps2pdf_sdk.zip

after you download and unzip it to a folder, please go to following folder,

xps2pdf_sdk\example_C#\WindowsFormsApplication_DLL

this C# example will let you know how to call xps2pdfsdk.dll directly and without depend on COM.exe, here is the sample source code,
+++++++++++++++++
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using System.IO;

namespace WindowsFormsApplication_DLL
{
public partial class Form1 : Form
{
[DllImport(@"xps2pdfsdk.dll", CharSet = CharSet.Auto)]
public static extern int VeryPDFXPS2PDFConverter(
[MarshalAs(UnmanagedType.LPStr)] string strCommandLine);

[DllImport(@"xps2pdfsdk.dll", CharSet = CharSet.Ansi)]
public static extern void VeryPDFXPS2PDFSetCode(
[MarshalAs(UnmanagedType.LPStr)] string strLicenseKey);

public Form1()
{
        InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)
{
string appPath = Path.GetDirectoryName(Application.ExecutablePath);
string strPDFFile = appPath + "\\sample\\test.xps";
string strOutFile = appPath + "\\_out_C#_dll.pdf";
string strLicenseKey = "XXXXXXXXXXXXXXXXX";

string strCmd = "-$ " + strLicenseKey + " \"" + strPDFFile + "\" \"" + strOutFile + "\"";
VeryPDFXPS2PDFSetCode(strLicenseKey);
int nRet = VeryPDFXPS2PDFConverter(strCmd);
}
}
}
+++++++++++++++++

If you encounter any problem with the new package, please feel free to let us know, thank you.
VeryDOC
--------------------------------------------
Thank you for the updated example, I am making some progress integrating this. I have two questions below:

1. Can you tell me which of the following dlls are required:
- cximagecrt.dll (required)
- msvcr71.dll (is this required?)
- tiffcp.dll (is this required?)
- xps2pdf.dll (required)
- xps2pdfsdk.dll (required)
- xpssdk.dll (is this required?)
- zlib.dll (is this required?)

2. In addition, is the "-linearize" parameter supported? I know it wasn't supported in prior version.

Thanks again!
Customer
--------------------------------------------
Also, can you tell me what the various return codes are (int nRet) in your example above?

Customer
--------------------------------------------
>>Thank you for the updated example, I am making some progress integrating this. I have two questions below:
>>1. Can you tell me which of the following dlls are required:

- cximagecrt.dll (required): yes, required.
- msvcr71.dll (is this required?): if your system has already installed msvcr71, this DLL is not necessary.
- tiffcp.dll (is this required?): This is for TIFF image processing only, if you need only convert from XPS to PDF file, this DLL is not necessary.
- xps2pdf.dll (required): yes, required.
- xps2pdfsdk.dll (required): yes, required.
- xpssdk.dll (is this required?): This DLL is for "-useprinter" option, if you don't use "-useprinter" option, you can delete this DLL file.
- zlib.dll (is this required?): yes, this DLL is used to decompress XPS file to memory, it's required.

>>2. In addition, is the "-linearize" parameter supported? I know it wasn't supported in prior version.

Thanks for your message, "-linearize" parameter is not supported in the current version, we will try to support this option in the future.

>>Also, can you tell me what the various return codes are (int nRet) in your example above?

VeryPDFXPS2PDFConverter() function 1 is indicate conversion successful, 0 is conversion fail, if you are fail to convert a XPS file to PDF file, please feel free send to us that XPS file, we will analyze that XPS file and come back to you asap.

VeryDOC
--------------------------------------------
Thank you for the prompt responses - what is the -useprinter option?

Is there a full list of all of the options available aside from the "readme.txt"?

Customer
--------------------------------------------
>>Thank you for the prompt responses - what is the -useprinter option?

"-useprinter" option will install a Virtual Postscript Printer into your system first, print XPS file to this Virtual Postscript Printer to create PS file, and then convert from PS file to PDF file again. The XPS Printing method will maintain everything no difference between XPS and generated PDF file, so you can use this option to convert some XPS files which not supported very well by direct conversion method.

>>Is there a full list of all of the options available aside from the "readme.txt"?

Thanks for your message, we haven't a another document yet, however, if you encounter any problem with XPS to PDF Converter software, please feel free to let me know, we are glad to provide more information to you asap.

VeryDOC

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)
Posted in XPS to PDF And Image Converter | Tagged | 1 Comment
Page 2 of 33412345...102030...Last »