doc to any converter

Running Doc2Any as a scheduled task

This command fails when the scheduled task is set to "Run whether user is logged on or not"; I've spent hours trying to resolve it. I found your suggestion on using the CmdAsUser, but won't work as the password has a '%' sign and can't be changed right now (CmdAsUser can't seem to process the % in a batch file)

It's been a while since I installed this on my client's machine, the file date for doc2any.exe is 8/25/2011, file version is 2.3.0.1 - I was hoping there might be an update that helps work around this issue (running on Windows 2008 R2, Office 2010 is installed)

Test batch file, tried with useOffice 1 and 0

rem TEST
c:\ExtranetDocs\doc2any_cmd\doc2any.exe -log c:\ExtranetDocs\tempdocs\logs\4483003.DOCX.log -killoffice 1 -useoffice 1 c:\ExtranetDocs\tempdocs\4483003.DOCX c:\ExtranetDocs\tempdocs\4483003.PDF

Customer

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

>>CmdAsUser can't seem to process the % in a batch file

If you are using .bat file to do the batch conversion, you can use %% to instead of % in the .bat file.

If you just run CmdAsUser.exe from CMD window, you can use quotation marks to include the password, e.g.,

C:\doc2any\CmdAsUser.exe Administrator . /p "pass%word" C:\doc2any\doc2any.exe C:\test.doc C:\out.pdf

Another solution is set MS Word DCOM run inside Administrator user account to instead of default SYSTEM user account, please look at following web pages for more information,

https://www.verydoc.com/blog/failed-to-call-doc2any-exe-from-c-or-vb-net-source-code.html
https://www.verydoc.com/blog/how-to-call-doc2any-exe-from-asp-code.html
https://www.verydoc.com/others/configure-word-and-excel.htm
https://www.verydoc.com/blog/cannot-test-doc2any-on-net.html
https://www.verydoc.com/blog/doc2any-exe-very-slow-when-executed-from-php.html
https://www.verydoc.com/blog/failed-to-call-doc2any-exe-from-java-application-to-convert-pptx-and-docx-files-to-pdf-files.html
https://www.verydoc.com/blog/run-doc2any-on-windows-2003-or-windows-2008-system.html
https://www.verydoc.com/doc-to-any-shell.html

VeryDOC

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

You need set MS Word DCOM run inside an interactive user account instead of default system user account, please look at following web pages for more information,

https://www.verydoc.com/blog/cannot-test-doc2any-on-net.html

Please arrange MS Word DCOM run from an interactive user account, please refer to following web page,

https://www.verydoc.com/doc-to-any-faq.html

"Your COM Name" should equal to "Microsoft Office Word 97 – 2003 Document" in your system, please give enough permission to "Microsoft Office Word 97 – 2003 Document" DCOM in your system to try again.

The following web pages will useful to you too,

https://www.verydoc.com/blog/how-to-call-doc-to-any-converter-sdk-from-asp-net-source-code.html

https://www.verydoc.com/blog/how-to-call-doc2any-exe-from-asp-code.html

http://www.verypdf.com/wordpress/201109/doc2any-sdk-dll-does-work-on-localhost-but-not-work-on-internet-2333.html

https://www.verydoc.com/doc-to-any-shell.html

https://www.verydoc.com/blog/run-doc2any-on-windows-2003-or-windows-2008-system.html

https://www.verydoc.com/blog/how-to-call-doc2any-from-php.html

We have also a VeryPDF Cloud API Platform, this is a Cloud Service to convert online office documents to PDF files, please look at following web pages for more information,

http://www.verypdf.com/online/cloud-api/user-guide.html
http://online.verypdf.com/api/

VeryPDF Cloud API Platform is a cloud service, all conversion will be done on our servers, you needn't install any software to your server in order to convert office documents to PDF files.

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)
doc to any converter

How can I get the number of color pages in a PDF file using C#?

Question:Given a PDF file with color and black & white pages, is there any way with C# to find out among the given pages which are color and which are black & white? Is there a solution on VeryDOC?

Answer:According to your needs, maybe you can have a free trial of software VeryDOC Spool File Page Counter SDK, by which you can count the black and white pages and color pages in document formats like PDF, PS and PCL files and it is useful for printer accounting software. Meanwhile this is SDK version software, it can be called from C# easily. It also can be called together with other programming language like Visual Basic, C/C++, Delphi, ASP, PHP, C#, .NET, etc. Please check more information of this software on homepage, in the following part, let us check how to use this software.

Step 1. Free download Spool File Page Counter SDK v2.0

  • When downloading finishes, there will be a zip file. Please extract it to some folder then you can use it normally like other SDK software.
  • And now there is no single user version of this software. If you need to develop it under single computer, please choose the server version, it also can be used under single computer.

Step 2. Count color page number of PDF.

  • When you need to call this software from C# for counting color page number, please refer to the following code template:
  • Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
      Dim bIsRenderToPDF As Integer
      Dim bwPageCount As Integer
      Dim colorPageCount As Integer
      Dim copyCount As Integer
      Dim nPageWidth As Double
      Dim nPageHeight As Double
      Dim strPaperSizeName As String
      Dim nRet As Integer
      Dim strMsg As String
      Dim strFileName As String

      bIsRenderToPDF = 0
      bwPageCount = 0
      colorPageCount = 0
      copyCount = 0
      nPageWidth = 0
      nPageHeight = 0
      strPaperSizeName = Space$(300)
      strFileName = Application.StartupPath() & "\test_tiger.pdf"
      nRet = ReadInfoFromPSFile(strFileName, bIsRenderToPDF, bwPageCount,
      colorPageCount, copyCount, nPageWidth, nPageHeight, strPaperSizeName)

      strMsg = strMsg + "FileName = " + strFileName + vbCrLf
      strMsg = strMsg + "bIsRenderToPDF = " + CStr(bIsRenderToPDF) + vbCrLf
      strMsg = strMsg + "bwPageCount = " + CStr(bwPageCount) + vbCrLf
      strMsg = strMsg + "colorPageCount = " + CStr(colorPageCount) + vbCrLf
      strMsg = strMsg + "copyCount = " + CStr(copyCount) + vbCrLf
      strMsg = strMsg + "PaperSizeName = " + CStr(strPaperSizeName) + vbCrLf
      MsgBox(strMsg)

      strMsg = strMsg + "FileName = " + strFileName + vbCrLf
      strMsg = strMsg + "bIsRenderToPDF = " + CStr(bIsRenderToPDF) + vbCrLf
      strMsg = strMsg + "bwPageCount = " + CStr(bwPageCount) + vbCrLf
      strMsg = strMsg + "colorPageCount = " + CStr(colorPageCount) + vbCrLf
      strMsg = strMsg + "copyCount = " + CStr(copyCount) + vbCrLf
      strMsg = strMsg + "PageWidth = " + CStr(nPageWidth) + vbCrLf
      strMsg = strMsg + "PageHeight = " + CStr(nPageHeight) + vbCrLf
      strMsg = strMsg + "PaperSizeName = " + CStr(strPaperSizeName) + vbCrLf
      MsgBox(strMsg)
    End Sub

    If you need to know more examples, please go to website. During the using, if you have any question, please contact us as soon as possible.

     

VN:F [1.9.20_1166]
Rating: 8.0/10 (1 vote cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)
pdf to vector converter

PDF to Vector Converter Change Margin of the file, it is change the paper size from PDF to PCL Conversion

I am now evaluating PDF to Vector Converter command line program. PDF file is converted into PCL and submitted to printer. I find that the margins of the PCL file are different from the original PDF file. The layout of the PCL file is scaled down. Everything is getting small. Is there any way to keep the original layout in the converted PCL file? 

Customer
--------------------------
I do not have order ID as I am still in the stage of evaluation. Please find the original PDF file and the converted PCL file from the attachment.

It is quite obvious that the left margin of the converted PCL file is narrower than that of the PDF file. And also the fonts in the PCL file are smaller.

Thanks for your help.

Customer
--------------------------
Please look at a new converted PCL file from following URL,

XXXXXXXXXXXXXXXXXXX

This PCL file was converted by latest version of pdf2vec.exe application, will this PCL file okay to you?

VeryDOC
--------------------------
The result is far better than before. Is it possible to pass the latest version of pdf2vec.exe for my evaluation?

Customer
--------------------------
Thanks for your message, I have ask our engineer to prepared a new version to you, you may download it from following URL to try,

XXXXXXXXXXXXXXXXXXX

you can run following command line to convert your PDF file to PCL file properly,

pdf2vec.exe -paper pdf pagetest.pdf pagetest.pcl

"-paper pdf" parameter will read paper size from input PDF file and set it to target PCL file, this will make sure input and output documents have same paper size, we hoping this option will work fine to you.

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)
pdf compressor

Tips for generating PDF from HTML and making PDF smaller

Question:I'm generating PDF from HTML from C# and the files are coming out a reasonable size. However, I'm interested in any tips anyone has for making the PDF as small as possible.The HTML being rendered is really basic, just a table of names and dates etc - doesn't have to be too pretty. Is there any solution on VeryDOC?

Answer: If you need to generate PDF from C#, software VeryDOC Doc Converter COM can help you do that. But this software can not help you compress output PDF to a reasonable size. It will output PDF from HTML with high quality to make the output PDF keeping all the original elements of HTML file.  If you need to compress PDF to a reasonable size, you’d better compress it with some professional tool like VeryDOC PDF Compressor, by it you can compress PDF according to its size. Say the PDF is text based, you can compress PDF by compressing fonts. In the following part, I will show you how to generate PDF and make it smaller by those two software.

Step 1. Generate PDF from C#.

  • When generating PDF from C#, please download software VeryDOC Doc Converter COM. When downloading finishes, please unzip it and then use it like other COM version software.
  • When generating PDF from C#, please refer to the following code template:
  • Set PdfCreator = New PDFOUTLib.PdfCreator
            PdfCreator.HTML2PDF = "C:\sample.html"
            PdfCreator.FileName = "C:\sample.pdf"
            PdfCreator.HeadersFooters = "off"
            PdfCreator.paperType = 6 '//7 is A4 paper, 6 is A3 paper
            PdfCreator.CreatePDF
            While PdfCreator.StillRunning = 1
                DoEvents
                Call WaitMessage
            Wend
            Set PdfCreator = Nothing
            Debug.Print "C:\sample.html -->C:\sample.pdf"

Step 2. Compress PDF

  • When compressing PDF, please download PDF Compressor Command Line. When downloading finishes, please extract it to some folder then you can use it like other command line version software.
  • When compressing text based PDF, please refer to the following command line templates:
  • pdfcompressor.exe -winfont -embedallfonts -subsetfonts -compressfonts C:\in.pdf C:\out.pdf
    pdfcompressor.exe -subsetfonts C:\in.pdf C:\out.pdf
    Here are some parameters:
    -winfont             : Use Windows fonts to replace Base14 fonts
    -embedallfonts : Embed all fonts
    -subsetfonts      : Subset fonts
    -compressfonts : Compress fonts

By those two software, I guess we can generate PDF and compress PDF to a reasonable size. Now we have not one software which can process those two functions perfectly. But we will make one in the future. During the using, if you have any question, please contact us as soon as possible.

     

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)
image to xps converter

How to convert tiff to XPS from ASP?

   In this article, we will talk about how to convert image tiff to XPS from ASP programming language. The software I use is named as VeryDOC Image to XPS Converter, by which you can also convert other image files like JPG, JPEG, GIF, PNG, BMP, TGA, WMF to XPS file. When converting tiff to XPS, this software either can convert single page XPS or multipage tiff file to XPS file format.  During the conversion, you can directly print output XPS file to some printer and specify output printing paper size. There are more functions of this software, please check them on our software homepage. In the following part, let us check how to convert tiff to XPS from ASP code template.

Step 1. Download Image to XPS Converter Command Line

  • For now there is no COM version of this software, but if you need, please contact us then we can develop one for you.
  • When downloading finishes, it is a zip file. Please extract it then you can call it from MS Dos Window. Even if this is command line application but it also could be called from other programming languages like Visual Basic, C/C++, Delphi, ASP, PHP, C#, .NET, etc.

Step 2. Convert tiff to XPS from ASP code

  • Here is the command line usage: Visual Basic, C/C++, Delphi, ASP, PHP, C#, .NET, etc.
  • When calling this software from ASP code for converting tiff to XPS, please refer to the following code template.
    Please use following ASP code to run the conversion inside a special user account,
    ~~~~~~~~~~~~~~~~~
    <%
        Set comEXEShell = Server.CreateObject("exeshell.shell")
        RootPath = Server.MapPath(".") & "\"
        EXEFile = RootPath & "img2xps\img2xps.exe"
        InFile = RootPath & "test.tif"
        OutFile = RootPath & "out.xps"
        strCommandLine = EXEFile & " " & InFile & " " & OutFile
        response.write strCommandLine & "<br>"
        comEXEShell.RunCommandLine "UserName", "Password", strCommandLine
        Set comEXEShell = Nothing
    %>
    ~~~~~~~~~~~~~~~~~
    When you use this software, please make sure you have the following two elements downloaded:
  • https://www.verydoc.com/exeshell.html
    https://www.verydoc.com/download/exeshell.zip
    Remark:
    You may encounter Error 1314 in some Windows systems when you switch between user accounts, this is caused by permission setting, please refer to the steps in #2 to solve the 1314 Error.

  • Here are some parameters you may use, please have a check:
  • -printer <string> : set printer name to create XPS file
    -paper <string>   : set paper size to XPS format
      auto   : retrieve paper size from image file
      number : standard paper size
      others : user defined paper size

    During the using, if you have any question, please contact us as soon as possible.

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)