Develop C# Console Application using VeryPDF PDFPrint Command Line

Dear VeryPDF Support,

I would like to know is it possible to create C# Console Application using VeryPDF PDF Command?

Thank You!

Regards,
Customer
---------------------------------------

image
Yes, of course, you can create C# Console Application using VeryPDF PDFPrint Command Line application, you can download PDFPrint Command Line from this web page,

http://www.verypdf.com/app/pdf-print-cmd/try-and-buy.html#buy
http://www.verypdf.com/pdfprint/pdfprint_cmd.zip

after you download it, you can call pdfprint.exe by following sample C# source code,

using System.Diagnostics;

class Program
{
    static void Main()
    {
        LaunchCommandLineApp();
    }

    /// <summary>
    /// Launch the legacy application with some options set.
    /// </summary>
    static void LaunchCommandLineApp()
    {
        // For the example
        const string ex1 = "C:\\";
        const string ex2 = "C:\\Dir";

        // Use ProcessStartInfo class
        ProcessStartInfo startInfo = new ProcessStartInfo();
        startInfo.CreateNoWindow = false;
        startInfo.UseShellExecute = false;
        startInfo.FileName = "D:\\VeryPDF\\pdfprint.exe";
        startInfo.WindowStyle = ProcessWindowStyle.Hidden;
        startInfo.Arguments = "-printer docPrint D:\\test.pdf";

        try
        {
            // Start the process with the info we specified.
            // Call WaitForExit and then the using statement will close.
            using (Process exeProcess = Process.Start(startInfo))
            {
                exeProcess.WaitForExit();
            }
        }
        catch
        {
             // Log error.
        }
    }
}

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 PDF Print | Tagged , | Leave a comment

ActiveX Error in application using VeryPDF.PCLtoPDFCom

I have integrated the SDK in a VB.net application to convert a .SPL file to .PDF and save that to a SQL database. This works fine in my Visual Studio IDE and as a compiled .EXE on my laptop but, it does not work on any other machine I attempt to run the .exe on. I receive an ActiveX error when trying to Declare the object reference to the PCLtoPDFCom object,

Dim VeryPDFCom As Object = CreateObject("VeryPDF.PCLtoPDFCom")

How can I register this on a workstation so that this does not stop the EXE from working? I cannot find any more information other than what was sent to us when we purchased the SDK. I need to speak with a technical resource to get this corrected ASAP. Please contact me to discuss.

Customer
-------------------------------------------
Thanks for your message, you can run a cmd window by administrator privilege, and run following command line to register PCLtoPDFCom.exe into your system,

PCLtoPDFCom.exe /regserver

after you register the PCLtoPDFCom.exe, you will able to CreateObject for "VeryPDF.PCLtoPDFCom" properly.

Here is the full example to call "VeryPDF.PCLtoPDFCom" from VB.NET source code,

Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
    Dim strFolderDir As String = Application.StartupPath()

    Dim VeryPDFCom As Object = CreateObject("VeryPDF.PCLtoPDFCom")
    Dim filesys As Object = CreateObject("Scripting.FileSystemObject")
    Dim strFolder As String = filesys.GetParentFolderName(strFolderDir)

    Dim strReturn As String = ""
    Dim nFileIndex As Integer = 0
    VeryPDFCom.EnableDebugLog(1)

    Dim strInFile As String = strFolder & "\test\test.pcl"
    Dim strOutFile As String = strFolder & "\bin\_test.pdf"
    Dim strCmd As String = "-$ XXXXXXXXXXXXXXXXXX """ & strInFile & """ """ & strOutFile & """"
    strReturn = strReturn & VeryPDFCom.PCLtoPDF(strCmd)
    nFileIndex = nFileIndex + 1

    MsgBox(strReturn)
End Sub

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 PCL Converter | Tagged , | Leave a comment

Use PDFStitch to stitch more PDF pages into a single PDF page, stitch multiple PDF files together, stitch several PDF pages into one big canvas-like PDF

Using Windows 7 and pdfstich v2.1 dated 20130322 (is that the latest version?)

Using the command-line version, I run something like:

pdfstitch.exe -rt 0 -order H -scale 100 infile.pdf outfile.pdf

It comes back immediately with this error message:

Error input file format. Please try again.

But the input file is legitimate; I can view it in any old pdf viewer.

Help!
Customer
-------------------------------------

Hi folks
 
Time to time I have to merge PDF pages (pages 2-3 to one double sized page etc.). I have always done that by printing multiple pages per sheet... in my case 2 pages per sheet, but instead of printing, I have saved my work as PDF.
 
Now I have upgraded to MacOS X 10.6 and that doesn't work any more. If I try, I get warning "Saving a PDF file when printing is not supported, use File>Save instead".
 
My problem is that there is no option "Save multiple pages per sheet"... so there′s no use to save it.... Is there some workarounds? I really need this feature and I can′t believe it has been taken away....

Customer

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

Thanks for your message, you can use VeryPDF PDF Stitcher to stitch more PDF pages into one single PDF page, you may download and install VeryPDF PDF Stitcher from this web page,

http://www.verypdf.com/app/pdf-stitch/try-and-buy.html
http://www.verypdf.com/dl2.php/verypdf-pdf-stitch.exe

I have tried following command line just now, it works fine,

"C:\Program Files (x86)\VeryPDF PDF Stitch v2.1\pdfstitch.exe" -rt 0 -order H -scale 100 D:\downloads\VeryPDF.pdf D:\downloads\_out.pdf

you may use full path for both input and output filenames to try again, we hope the full path will work fine to you.

Please look at following screenshot for the stitched PDF file,

image

Here is the full command line options which supported by PDF Stitcher Command Line application,

C:\>"C:\Program Files (x86)\VeryPDF PDF Stitch v2.1\pdfstitch.exe"

=============================================================================
VeryPDF PDF Stitch
Copyright (C) 2005-2013 VeryPDF.com, Inc.
Web: http://www.verypdf.com/app/pdf-stitch/
Email: support@verypdf.com

VeryPDF PDF Stitch can help you stitch multiple PDF pages onto a sheet. You can specify how the pages are ordered, either in vertical columns or horizontally across the sheet.

Usage: pdfstitch [options] <input file> <output file>

Options:
-plan <string> <path>  : Use a plan file instead of other options. <string>
                         refers to the plan file type: "lua" or "legacy".
                         <path> refers to the path of the selected plan file.
                         Please do not use other options when used this
                         option.
-pr <int,int,...>      : Select the page range, e.g., 1,3,5-10. Or you can use
                         -even or -odd.
-even                  : Select only the even pages.
-odd                   : Select only the odd pages.
-rt <int>              : Rotate the input PDF pages. (0, 90, 180, or 270.
                         Default is 0.)
-per <int*int>         : Set pages per sheet, e.g., 2*4 refers to put 8 pages
                         per sheet: 2 pages a row and 4 pages a column.
-addline <int,int,int> : Add lines. <int,int,int> refer to the RGB values.
                         0<int<255.
-order <string>        : Specify the page order on each sheet.
        H              : Horizontal (default value)
        V              : Vertical
        HR             : Horizontal-reverse
        VR             : Vertical-reverse
-gx <int unit>         : Specify the width of each vertical gutter.
                         Unit is in, mm, or pt.
-gy <int unit>         : Specify the height of each horizontal gutter.
                         Unit is in, mm, or pt.
-t <int unit>          : Define the top margin for each output sheet.
                         Unit is in, mm, or pt.
-l <int unit>          : Define the left side margin for each output sheet.
                         Unit is in, mm, or pt.
-r <int unit>          : Define the right side margin for each output sheet.
                         Unit is in, mm, or pt.
-b <int unit>          : Define the bottom margin for each output sheet.
                         Unit is in, mm, or pt.
-size <string>         : Specify the sheet size. For instance, A3, A4, B3, and
                         letter. Cannot be used with -scale.
-scale <int>           : Enlarge or shrink sheets by an exact percentage,
                         e.g., -scale 100 is to retain the original size.
-$ <regcode>           : Register the application.

Examples:
pdfstitch -plan "lua" "test.plan" input.pdf _plan.pdf
pdfstitch -pr 1-5,6,9 input.pdf _pr.pdf
pdfstitch -even input.pdf _even.pdf
pdfstitch -odd input.pdf _odd.pdf
pdfstitch -rt 90 input.pdf _rt.pdf
pdfstitch -per 2*2 input.pdf _per.pdf
pdfstitch -addline 0 255 255 input.pdf _addline.pdf
pdfstitch -order V input.pdf _order.pdf
pdfstitch -gx 50 mm -gy 50 mm input.pdf _gxgy.pdf
pdfstitch -t 10 mm -b 10 mm -l 10 mm -r 10 mm input.pdf _tblr.pdf
pdfstitch -size A4 input.pdf _size.pdf
pdfstitch -scale 50 input.pdf _half.pdf

VeryPDF

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

Right margin cut off when print a PDF file

Hi,

We are using the pdfprintsdk.dll (v2.2.0.1) in our program for pdf printing task. Recently we found an issue that sometimes the right margin and bottom margin of printed page is cut off. In our program we use the command below:

pdfprint -$ "XXXX-XXXX-XXXX-XXXX" -printer "Konica Level 6" -papersource "Auto" -raster2 D:\test.pdf

But when we print the pdf document from Adobe Reader, the page is printed very well.

I tried the latest pdfprint.exe file downloaded from your website but still got that issue. I can provide the pdf file to VeryPdf for testing.

We have been trouble-shooting a few days. Could you please help fix that issue? Thanks.

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

image

You didn't mention how closely your printing is to the edge of your paper.

Another thing to consider is the physical limits of printers. If your margin is too close to the edge of the paper, then the printer absolutely will not print it--regardless of what any program says. Different printers can print different distances from the edge.

However, you can use pdfprint.exe to scale the paper during printing. Please run following command lines to try again, these command lines will scale the PDF page contents during printing, we hope these command lines will solve "Right margin cut off" problem to you,

pdfprint.exe -printermargins -raster2 -printer "Konica Level 6" -papersource "Auto" C:\test.pdf

pdfprint.exe -printermargins -raster2 -scalex 95 -scaley 95 -printer "Konica Level 6" -papersource "Auto" C:\test.pdf

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 PDF Print | Tagged , | Leave a comment

How to convert HTML file to PDF file from ASP code on 64bit Windows Server?

This article will let you know how to convert HTML files to PDF files On Web Servers With "VeryPDF HTML Converter Command Line" and "VeryPDFComRunCmd COM Component", you can convert HTML files to PDF files from ASP, PHP, C#, ASP.NET etc, program languages.

VeryPDF HTML Converter Command Line can be downloaded from this web page,

http://www.verypdf.com/app/html-converter/try-and-buy.html#cmd
http://www.verypdf.com/htmltools/htmltools.zip

after you download and unzip it to a folder, you can run following command lines to convert a web page to PDF file first,

htmltools.exe -$ XXXXXXXXXXXXXXXXXX test.htm _test1.pdf
htmltools.exe -$ XXXXXXXXXXXXXXXXXX http://www.verypdf.com _web1.pdf

htmltools.exe -$ XXXXXXXXXXXXXXXXXX -html2pdf2 test.htm _test_html2pdf2.pdf

htmltools.exe -$ XXXXXXXXXXXXXXXXXX -webkit test.htm _test_webkit.pdf
htmltools.exe -$ XXXXXXXXXXXXXXXXXX -webkit http://www.verypdf.com _web_webkit.pdf
htmltools.exe -$ XXXXXXXXXXXXXXXXXX -webkit http://www.verypdf.com/artprint/docprintsdk.htm _verypdf_webkit.pdf

htmltools.exe -$ XXXXXXXXXXXXXXXXXX -webkit2 test.htm _test_webkit2.pdf
htmltools.exe -$ XXXXXXXXXXXXXXXXXX -webkit2 -width 1080 -height 1080 http://www.verypdf.com _web_webkit2.pdf
htmltools.exe -$ XXXXXXXXXXXXXXXXXX -webkit2 -width 1080 -height 1080 http://www.verypdf.com/artprint/docprintsdk.htm _verypdf_webkit2.pdf

VeryPDFComRunCmd COM Component can be downloaded from this web page,

http://www.verydoc.com/exeshell.html#VeryPDFComRunCmd_COM_Component
http://www.verypdf.com/dl2.php/VeryPDFComRunCmd.zip

after you download and unzip it to a folder, you can run install.vbs to install "VeryPDFComRunCmd.exe" into your system, install.vbs file contains following line,

VeryPDFComRunCmd.exe /regserver

You can also run this command line in CMD window with administrator privilege to register "VeryPDFComRunCmd.exe" into your system.

Now, you can call "VeryPDFCom.RunCmd" from your ASP code to convert from HTML file to PDF file, you can use a simple code at like below,

<%
set VeryPDFCom = Server.CreateObject("VeryPDFCom.RunCmd")
dim nRetVal, bRet
strRet = VeryPDFCom.RunCmd2("D:\VeryPDF\htmltools.exe -webkit http://www.verypdf.com D:\out.pdf", 5)
Response.Write strRet & vbCrlf
%>

You may encounter "Permission denied" error message, like below,

------------------------------------------
Error Type:
Microsoft VBScript runtime (0x800A0046)
Permission denied: 'CreateObject'
/html2pdf.asp, line 22
------------------------------------------

In order to solve "Permission denied" error message, you need give "Full Control" Permission to "Everyone" to "VeryPDFCom.RunCmd", please look at details at following web page,

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

After you give "Full Control" Permission to "Everyone" user account to "VeryPDFCom.RunCmd" DCOM, the "Permission denied" error in ASP will be solved completely, you will able to convert from HTML files to PDF files from ASP code without any problem.

Here is a PHP example to call htmltools.exe application by VeryPDFComRunCmd COM,

<?php

$comobj = new COM("VeryPDFCom.RunCmd") or die("Couldn't create the COM Component");
$strCmd = $comobj->RunCmd2("D:\VeryPDF\htmltools.exe -webkit http://www.verypdf.com D:\out.pdf", 5);
echo("Output is:\r\n" . $strCmd);

?>
 
ASP.NET example to call htmltools.exe application by VeryPDFComRunCmd COM,
<%

dim VeryPDFCom = Server.CreateObject("VeryPDFCom.RunCmd")
dim strCmd = "D:\VeryPDF\htmltools.exe -webkit http://www.verypdf.com D:\out.pdf"
Response.Write(strCmd & vbCrlf)
dim strRet = VeryPDFCom.RunCmd2(strCmd, 5)
Response.Write(strRet & vbCrlf)

%>

If you encounter any problem with htmltools.exe application and VeryPDFComRunCmd COM, please feel free contact us, we will assist you asap,

http://support.verypdf.com/open.php

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 HTML Converter (htmltools) | Tagged | Leave a comment
Page 3 of 1,38612345...102030...Last »