How to backup and restore tray option with PDFPrint Command Line software?

Hello VeryPDF Support Team,

We are currently testing the Evaluation Version of your PDFPrint as a significant part of an complex printing process. In this scenario I recognized a behavior in your software that can cause some unwanted effects in a printing process. As I read in the debug log (with parameter -debug) when printing on a defined printer (with parameter -printer "xxx") the software changes the default printer of the user, who runs the pdfprint.exe, to this defined printer and restores this option after the printing completes. This means, if a second application of the pdfprint.exe is spawned by the same user, right after the first one sets the default printer but before the printing is started, the second application overrides the default printer which was set by the first application and so the first application prints on the wrong printer. I was able to readjust this scenario by spawning two pdfprint.exe processes with different defined printers in exact the same moment. The result was that both PDF Files were printed on the printer defined in the second application. This may happen very rarely, but with an increased amount of parallel calls of the pdfprint.exe this behavior can cause huge problems in my whole printing process.

I read in your documentation, that there is a parameter called -nochgprinter (which doesn’t change the default printer) but I don’t understand why you don’t generally use this option and I’m forced to always set it.

Is there some behavior that force you to generally change the default printer of the executing user? (It’s also very strange that, with the parameter -nochgprinter, I don’t see any entry in the debug log (parameter -debug) where the defined printer for the job is shown.)

That was my minor "problem" because I can solve it by using the "nochgprinter" parameter. The bigger thing is, that the same behavior happens when changing the paper bin (parameter -chgbin) of a printing process. In this case a second application of the pdfprint.exe can override the paper bin setting of a first one when started in the "right" moment by the same user on the same printer. This is crucial for my printing process because we use a wide variety of paper bins with different papers inside. Is there a solution for this problem available or do you have a tip for me how the solve this?

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

image
You can use "-restoreprinter" option to backup and restore tray option for the target printer,

-restoreprinter : restore original settings to printer after printing

e.g.,

pdfprint.exe -restoreprinter -chgbin 15 -printer "docPrint" D:\test.pdf

VeryPDF

See Also:

http://www.verypdf.com/app/pdf-print-cmd/pdfprint-sdk-manual.html
http://www.verypdf.com/app/pdf-print-cmd/how-to-use.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 Print | Tagged | Leave a comment

Which product is a good choice to convert HTML file to PDF file? htmltools.exe or docPrint Pro software?

Hi,

I downloaded the HTMLtools.Exe. I need to convert HTML file to TIFF (PDF also possible) and it looks good to me. I need to convert to multipage A4, then print it. I played with the parameters and could not create multipage. Also size is not clear. Please send me an email so I can send a sample file for you.

I also tried the Html2Any but also failed. 

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

image
If you wish convert HTML file to TIFF file, we suggest you may download Document Converter (docPrint Pro) from following web page to try, you can use Document Converter (docPrint Pro) to convert HTML file to TIFF file easily,

http://www.verypdf.com/app/document-converter/try-and-buy.html

for example,

"C:\Program Files (x86)\docPrint Pro v6.0\doc2pdf.exe" -i D:\test.html -o D:\out.tif -b 1 -r 300

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

I tested the DocPrint.
The color did not convert, the shades did not convert.

I also tested the Html2Any.
It works good for PDF and Tif, but the font of the header not preserve,
And some other minor issues.

From the tools that you have I prefer the HtmlTools.
I manage to convert to PDF and break the HTML to pages (-pageh 1100).
What is the units for the -pageh parameter?

The convert to tiff, does not split to pages. It create one long page.
I prefer to convert to tiff. Tif is my input for my next step.

This is the command line:

C:\HTML2TIFF\HtmlTools>C:\HTML2TIFF\HtmlTools\htmltools\htmltools.exe -xres 300 -yres 300 -ph 1100 -multipagetif C:\HTML2TIFF\3560356.htm C:\HTML2TIFF\3560356-4.pdf

Attached the source and target.

Customer
---------------------------------------------------------------
>>From the tools that you have I prefer the HtmlTools.
>>I manage to convert to PDF and break the HTML to pages (-pageh 1100).
>>What is the units for the -pageh parameter?

The units for the -pageh parameter is Point.

>>The convert to tiff, does not split to pages. It create one long page.
>>I prefer to convert to tiff. Tif is my input for my next step.
>>This is the command line:
>>C:\HTML2TIFF\HtmlTools>C:\HTML2TIFF\HtmlTools\htmltools\htmltools.exe -xres 300 -yres 300 -ph 1100 -multipagetif C:\HTML2TIFF\3560356.htm C:\HTML2TIFF\3560356-4.pdf

Yes, htmltools.exe doesn't split the pages in TIFF file, it will create a long TIFF file.

In general, I suggest you may use docPrint Pro v6.0, you can use following command line to keep the colors in output TIFF file,

"C:\Program Files (x86)\docPrint Pro v6.0\doc2pdf.exe" -i D:\downloads\3560356.htm -o D:\downloads\out-%04d.png

you can run following command line to combine output PNG files into one multi-page TIFF file,

"C:\Program Files (x86)\docPrint Pro v6.0\imgconv.exe" D:\downloads\out-*.png D:\downloads\out.tif

Please refer to the screenshot of converted TIFF file at below, this TIFF file has 6 pages and it looks fine, it has a good quality compare to the TIFF files which created by htmltools.exe application, you can print or reuse this high quality TIFF file easily,

image

VeryPDF

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 docPrint Pro, HTML Converter (htmltools) | Tagged , | Leave a comment

Which product is a good choice to convert HTML file to PDF file? htmltools.exe or docPrint Pro software?

Hi,

I downloaded the HTMLtools.Exe. I need to convert HTML file to TIFF (PDF also possible) and it looks good to me. I need to convert to multipage A4, then print it. I played with the parameters and could not create multipage. Also size is not clear. Please send me an email so I can send a sample file for you.

I also tried the Html2Any but also failed. 

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

image
If you wish convert HTML file to TIFF file, we suggest you may download Document Converter (docPrint Pro) from following web page to try, you can use Document Converter (docPrint Pro) to convert HTML file to TIFF file easily,

http://www.verypdf.com/app/document-converter/try-and-buy.html

for example,

"C:\Program Files (x86)\docPrint Pro v6.0\doc2pdf.exe" -i D:\test.html -o D:\out.tif -b 1 -r 300

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

I tested the DocPrint.
The color did not convert, the shades did not convert.

I also tested the Html2Any.
It works good for PDF and Tif, but the font of the header not preserve,
And some other minor issues.

From the tools that you have I prefer the HtmlTools.
I manage to convert to PDF and break the HTML to pages (-pageh 1100).
What is the units for the -pageh parameter?

The convert to tiff, does not split to pages. It create one long page.
I prefer to convert to tiff. Tif is my input for my next step.

This is the command line:

C:\HTML2TIFF\HtmlTools>C:\HTML2TIFF\HtmlTools\htmltools\htmltools.exe -xres 300 -yres 300 -ph 1100 -multipagetif C:\HTML2TIFF\3560356.htm C:\HTML2TIFF\3560356-4.pdf

Attached the source and target.

Customer
---------------------------------------------------------------
>>From the tools that you have I prefer the HtmlTools.
>>I manage to convert to PDF and break the HTML to pages (-pageh 1100).
>>What is the units for the -pageh parameter?

The units for the -pageh parameter is Point.

>>The convert to tiff, does not split to pages. It create one long page.
>>I prefer to convert to tiff. Tif is my input for my next step.
>>This is the command line:
>>C:\HTML2TIFF\HtmlTools>C:\HTML2TIFF\HtmlTools\htmltools\htmltools.exe -xres 300 -yres 300 -ph 1100 -multipagetif C:\HTML2TIFF\3560356.htm C:\HTML2TIFF\3560356-4.pdf

Yes, htmltools.exe doesn't split the pages in TIFF file, it will create a long TIFF file.

In general, I suggest you may use docPrint Pro v6.0, you can use following command line to keep the colors in output TIFF file,

"C:\Program Files (x86)\docPrint Pro v6.0\doc2pdf.exe" -i D:\downloads\3560356.htm -o D:\downloads\out-%04d.png

you can run following command line to combine output PNG files into one multi-page TIFF file,

"C:\Program Files (x86)\docPrint Pro v6.0\imgconv.exe" D:\downloads\out-*.png D:\downloads\out.tif

Please refer to the screenshot of converted TIFF file at below, this TIFF file has 6 pages and it looks fine, it has a good quality compare to the TIFF files which created by htmltools.exe application, you can print or reuse this high quality TIFF file easily,

image

VeryPDF

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 docPrint Pro, HTML Converter (htmltools) | Tagged , | Leave a comment

How to use OCR technology to convert scanned PDF file to XLSX format?

Dear support-team,

image

While a conversion of a regular OCR PDF (lang German) worked for an XLS output, it did not for an XLSX format. Any idea of why that wouldn't work? We dearly require XLSX to be working.

Looking forward to hearing from you.

Regards
Customer
------------------------------------------------

image
Thanks for your message, you can use our "VeryPDF OCR to Any Converter Command Line" to convert scanned PDF file to XLS format,

http://www.verypdf.com/app/ocr-to-any-converter-cmd/try-and-buy.html
http://www.verypdf.com/dl2.php/ocr2any_cmd.zip

You can use -ocr2 and -ocr2excelmode options to convert scanned PDF file to XLS file,

-ocr2excelmode <int> : set output Excel format when -ocr2 used
-ocr2excelmode 0: One big sheet + All page sheets
-ocr2excelmode 1: All page sheets
-ocr2excelmode 2: One big sheet, default mode

e.g.,

ocr2any.exe -ocr2 -ocr2excelmode 0 test_table_ocr.pdf _test\_test_table_ocr.pdf.0.xls
ocr2any.exe -ocr2 -ocr2excelmode 1 test_table_ocr.pdf _test\_test_table_ocr.pdf.1.xls
ocr2any.exe -ocr2 -ocr2excelmode 2 test_table_ocr.pdf _test\_test_table_ocr.pdf.2.xls

image

"VeryPDF OCR to Any Converter Command Line" is can only create XLS file, it can't create XLSX file format yet, however, after you purchased "VeryPDF OCR to Any Converter Command Line" product, please send to us your Order ID, we will add XLSX output format to you free, we hoping this offer will okay to you.

VeryPDF

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 OCR Products | Tagged , , , | Leave a comment

How to print PDF files from Windows Service?

Hello,

Is it possible to call pdfprintsdk.dll from a Windows-service ?
I tried it but I keep getting nRet=-4 ...

My test-code

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Linq;
using System.ServiceProcess;
using System.Text;
using System.Runtime.InteropServices;
using System.IO;

namespace Service
{
        public partial class Service1 : ServiceBase
        {
                private static string LicenseKey = null;
                private static string PrintCommandTemplate =
                              "pdfprint -$ \"[LicenseKey]\" -printer \"\" \"\"";
               
                [DllImport("pdfprintsdk.dll")]
                public static extern int VeryPDF_PDFPrint(string CommandLine);
               
                public Service1()
                {
                        InitializeComponent();
                        if (!System.Diagnostics.EventLog.SourceExists("MySource"))
                        {
                                System.Diagnostics.EventLog.CreateEventSource
                                    ("MySource", "MyNewLog");
                        }
                        eventLog1.Source = "MySource";
                        eventLog1.Log = "MyNewLog";
                }
               
                protected override void OnStart(string[] args)
                {
                        string strPDFFile = (@"D:\ASCIW\EXENET\LIB\
                              pdfprint_sdk\bin\readme.pdf");
                        eventLog1.WriteEntry("Printing "+strPDFFile+" ...");
                        long nRet = PrintDoc(strPDFFile, "Brother HL-5450DN");
                        eventLog1.WriteEntry(nRet.ToString());
                }
               
                protected override void OnStop()
                {
                }
               
                public static long PrintDoc(string FullDocumentName, string PrinterName)
                {
                        string PrintCommand = PrintCommandTemplate;
                       
                        try
                        {
                                if (LicenseKey != null)
                                        PrintCommand = PrintCommand.Replace
                                        ("[LicenseKey]", LicenseKey);
                                else
                                        PrintCommand = PrintCommand.Replace
                                        ("[LicenseKey]", "XXXXXXXXXXXXXXXX");
                                PrintCommand = PrintCommand.Replace("", PrinterName).Replace
                                        ("", FullDocumentName);
                                return VeryPDF_PDFPrint(PrintCommand);
                        }
                        catch (SyntaxErrorException)
                        {
                                return -999;
                        }
                }
        }
}

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

image
Because Windows System user account hasn't network ability, so when you call pdfprint.exe from Windows Service, you will not able to use network printer, because network is prohibited in System user account.

We have a solution to allow you to print PDF files from Windows Service, please look at following web pages for more information,

http://www.verypdf.com/wordpress/201109/how-do-i-call-pdfprint-from-windows-service-or-local-system-to-print-the-pdf-file-to-network-printer-2310.html

http://www.verypdf.com/wordpress/201109/pdf-printer-cant-print-pdf-file-to-network-printer-from-windows-service-2309.html

The general solution is switch user account from System to Administrator or other interactive user accounts, you can run the service from Administrator user account directly or use CmdAsUser.exe to call pdfprint.exe from Administrator user account, this will overcome the limitation of System user account.

You can also grant Network Access ability to System user account, if you like to do, please refer to following web pages,

http://stackoverflow.com/questions/510170/the-difference-between-the-local-system-account-and-the-network-service-acco

http://social.technet.microsoft.com/Forums/windowsserver/en-US/e50abc9a-2141-42ba-a6ee-b228a01acfe8/how-to-grant-network-access-to-local-user?forum=winservergen

http://serverfault.com/questions/135867/how-to-grant-network-access-to-localsystem-account

http://stackoverflow.com/questions/3439760/localsystem-vs-system-vs-local-system-windows-system-accounts

http://kb.ucla.edu/articles/local-system-accountnt-authoritysystem-and-network-resource-access

Please also refer to following web pages for more information,

http://www.verypdf.com/wordpress/201311/how-to-print-a-pdf-file-to-network-printer-from-windows-service-39509.html

http://www.verypdf.com/wordpress/201109/pdf-printer-cant-print-pdf-file-to-network-printer-from-windows-service-2309.html

You can also use VeryPDFComRunCmd COM to call pdfprint.exe from Windows Service,

http://www.verydoc.com/exeshell.html#VeryPDFComRunCmd_COM_Component

http://www.verydoc.com/blog/verydoc-release-notes-verydoc-releases-an-exe-com-of-verypdfcomruncmd-exe-today-verypdf-exe-com-does-allow-you-to-call-ms-office-and-any-exe-application-from-asp-php-c-net-etc-program-languag.html

VeryPDF

VN:F [1.9.20_1166]
Rating: 10.0/10 (1 vote cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)
Posted in PDF Print | Tagged , | Leave a comment
Page 1 of 1,27812345...102030...Last »