doc to any converter

Create PDF from word document from desktop application using C++ or C#?

Question:Any easy way to create a PDF document of a word file from desktop application using C++ or C#? Any best practices, please share, list all possible APIs free/paid so that this thread helps C++/C# programmers.

Answer: When you need to create PDF from word from C++/C# by desktop version, maybe you can have a free trial of this software VeryDOC DOC to Any Converter, which  is command line version software. And if you need to use API for creating PDF from word, maybe you can have a free trial of those software:  VeryPDF Office Document and PDF to HTML5 Slideshow Cloud API, VeryPDF Viewer Cloud API (Online Document / PDF Viewer Cloud API). By those API, you can also run the conversion from C++/C# programmers.  Here in VeryDOC, we do not have tutorial for creating PDF from word of API application, please check in VeryPDF knowledge base. In the following part, I will show you how to create PDF from word by desktop application using C++/C#.

Download DOC to Any Converter Command Line

  • Please download this software to your computer. As it is command line version software, when downloading finishes, there will be a zip file. Please extract it to some folder then you can call it from MS Dos Window normally.
  • When you use this software, please refer to code template of COM version. In the command line zip folder, there is no code template available.

Creating PDF from word using C++/C# programmers.

  • Here is code template of creating PDF from word by C#, please have a check.
  • Please by following steps to call doc2any.exe inside a special user account,
    1. Please download and install EXEShell COM Library (freeware) first, and then use the following C# code to run the conversion inside a special user account,
    ~~~~~~~~~~~~~~~~~
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    namespace ConsoleApplication1
    {
        class Program
    {
    static void Main(string[] args)
    {
    System.Type otype = System.Type.GetTypeFromProgID("exeshell.shell");
    Object o = System.Activator.CreateInstance(otype);
    otype.InvokeMember("RunCommandLine", System.Reflection.BindingFlags.InvokeMethod, null, o,
    new object[] { "UserName", "Password", @"C:\doc2any.exe ""C:\test.doc"" ""C:\out.pdf""" });
    otype = null;
    }
    }
    }
    ~~~~~~~~~~~~~~~~~
    Remark:
    You may encounter Error 1314 in some Windows systems when you switch between user accounts, this is caused by permission setting, please by following steps to solve this 1314 Error,
    ERROR 1314:
    ~~~~~~~~~~~~~
    1314 A required privilege is not held by the client. ERROR_PRIVILEGE_NOT_HELD
    ~~~~~~~~~~~~~

By this method, you can create PDF from word  by C#. 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)
pdf to epub converter

How to convert PDF to ePub in batch and keep original layout?

   When you need to convert PDF to ePub and keep original layout, maybe you can have a free trial of this software VeryDOC PDF to ePub Converter. After conversion, you can view ePub file under iPad, iPhone, iPod Touch, Sony Reader, etc. This software is GUI version and supports all version from 1.0 - 1.8 formats (.pdf), so you do not need to worry that there will be PDF files can not be converted.

This software is standalone and efficient desktop application to convert eBooks from PDF to ePub format, so you do not need to install any third party application. It can preserve the original text, layout and images in the output ePub eBooks. Please check more information of this software on homepage, in the following part, I will show you how to use this software.

Step 1. Free download VeryDOC PDF to ePub Converter

  • This software only sells at $24.95 then you can use it the whole life without needing to updating with any further payment.
  • When downloading finishes, there will be an exe file. Please install this software by double clicking the exe and following installation message.
  • The following snapshot is from the software interface, please have a check.

pdf-to-epub software interface

Step 2. Convert PDF to ePub in batch and keeping its original formats.

  • This software is quite easy to use. All you need to do is that drag and drop PDF files from its containing folder to software interface.
  • Choose output options like text image to ePub or each page as an image to ePub which method can be used to keep original layout and format perfectly.
  • This software also allows you to choose conversion page range, you can either convert all page to ePub or just a few pages to ePub file.
  • This converter also can help you convert password protected PDF file to ePub under the condition that you know the open password. It can convert owner password protected PDF to ePub directly.
  • The click button Convert to run the conversion. Meanwhile you will be reminded to choose the output folder. Later you can check the output file in specified output folder.
  • There is no limit about how many files would be converted, so you can add PDF file as many as you need. It will output in a few seconds.

By this software and this method, we can convert PDF to ePub and keeping its original layout and formats. 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)
doc to any converter

Running Doc2Any from Java program by run as service option.

Hi,

I am working on an java customization application. The java application retrieves a file from the database, saves it to a folder on the server, and then attempts to run the doc2any process. However, when running the process I get an error that Excel cannot access the file.

While I could use the runasservice option, that doesn't give me any way to verify the successful creation of the PDF file.

Do you have any suggestions?

Thanks,
Customer
----------------------------------------------
You need set MS Word DCOM and MS Excel DCOM run inside an interactive user account, please refer to following web pages for more information,

http://www.verypdf.com/wordpress/201109/doc2any-sdk-dll-does-work-on-localhost-but-not-work-on-internet-2333.html
https://www.verydoc.com/blog/how-to-call-doc2any-exe-from-asp-code.html
https://www.verydoc.com/blog/running-doc2any-as-a-scheduled-task.html
https://www.verydoc.com/others/configure-word-and-excel.htm
https://www.verydoc.com/blog/failed-to-call-doc2any-exe-from-c-or-vb-net-source-code.html
https://www.verydoc.com/blog/cannot-test-doc2any-on-net.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/blog/run-office-to-pdf-converter-or-doc2any-in-unattended-user-account.html
http://www.verypdf.com/wordpress/201106/doc2any-dcom-permissions-232.html

Please look at following web page for more information about how to give enough permission to MS Word DCOM or MS Excel DCOM service,

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

If you still can't get it work, please feel free to let us know.

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)
metafile to pdf converter

Is there a library to render Windows metafiles to a Cairo surface for converting to PDF?

Question:I'm trying to implement a PDF output target in an existing application which uses Windows metafiles (specifically, Aldus Placeable Metafiles) as one of its inputs. Is there a pre-existing library to render such metafiles to a Cairo surface (or some other PDF rendering library)? Is there any solution on VeryDOC?

Answer: When you need to convert Metafile to PDF by some library, you do not need to converting metafiles to a Cairo surface first and then to PDF as VeryDOC software Metafile to PDF Converter can help you convert Metafile to PDF  directly. By this software, we can also convert EMF, WMF and RTF files to Adobe PDF files. Metafile (EMF, WMF) to PDF supports the usual PDF features, including compression and 128 bit encryption and it was the first command line application to allow embedding of font subsets to reduce file size. Please check more information of this software on homepage, in the following part, I will show you how to use this software.

Step 1. Free download Metafile to PDF Developer License

  • When you need to use the library, please download the developer version. For uploading and downloading easily, we have compressed it to zip file.
  • When downloading finishes, please extract it to some folder then you can call it normally.

Step 2. Converting Metafile to PDF easily.

  • This converter is available via an easily integrated COM object (or DLL Library, or Command Line), enabling developers to access the converter via any programming or scripting languages, such as Visual Basic, C/C++, Delphi, ASP, PHP, C#, .NET, etc. Using the COM object (or DLL Library, or Command Line), file conversions can be done consecutively or simultaneously.
  • For showing conversion easily, here I will take the command line version parameters for example. Please check source code examples in download extracted folder.
  • When converting Metafile to PDF, please refer to the following command line templates and parameters:
  • emf2pdf.exe C:\in.emf C:\out.pdf
    emf2pdf.exe C:\*.emf C:\*.pdf
    emf2pdf.exe -append 2 -width 612 -height 792 C:\*.emf C:\out.pdf
    emf2pdf.exe -append 2 C:\*.emf C:\out.pdf
    Here are some parameters for your reference:
    -width <int>        : Set page width to PDF file
    -height <int>       : Set page height to PDF file
    -margin <string>    : Set page margin to PDF file
            -margin 10          : Set margin to 10pt to left
            -margin 10x10       : Set margin to 10pt to left,top
            -margin 10x10x10    : Set margin to 10pt to left,top,right
            -margin 10x10x10x10 : Set margin to 10pt to left,top,right,bottom

Please check more parameters and usage on homepage, I can not list all of them here as there are too many. 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)
postscript to text converter

How to convert Postscript to text or image?

Question: Is there a Postscript to Text/Image Converter package? I need the command line version. Is there such package on VeryDOC?

Answer: Now on VeryDOC, we do not have software which can be used to convert Postscript to image, postscript to text by one software. But we have software which can help you make it in separated version. They are VeryDOC Postscript to Text Converter and VeryDOC Postscript to Image Converter. Both of them are command line version. Please check more information of those two software on homepage. in the following part, I will show you brief information of converting Postscript to image, postscript to text.

Converting postscript to text.

  • Download Postscript to Text Converter Command Line. When downloading finishes, it is a zip file. You need to extract it to some folder then you can call it normally from MS Dos Windows.
  • Please rest assured that all the VeryDOC software are free downloading, and there will be no virus taken in.
  • Here is the usage of software: ps2txt.exe [options] [Options] <PS Files>
  • When converting postscript to text, please refer to the following command line templates:
  • ps2txt.exe C:\input.ps C:\output.txt
    ps2txt.exe -nolayout C:\input.ps C:\output.txt
    Here is the parameters for reference:
    -firstpage <int>   : first page to print, from 1 to max page
    -lastpage <int>    : last page to print, from 1 to max page
    -nolayout          : don't maintain original physical layout
    -nopgbreak         : don't insert page breaks between pages

Converting Postscript to image

  • When converting Postscript to image, please download Postscript to Image Converter. Please use the same method like above software to make it work.
  • Here is the usage:ps2img [options] <-i PS File> [-o Output]
  • When converting Postscript to image, please refer to the following command line templates:
  • ps2img -c lzw -i C:\input.ps -o C:\output.tif
    ps2img -q 80 -i C:\input.ps -o C:\output.jpg
    ps2img -b 4 -i C:\input.ps -o C:\output.tif
    Here are some parameters for your reference:
    -i [input PS file]   : Input PS filename
    -o [output TIF file] : Output TIFF filename
    -g                   : Convert to 8-bit grayscale image file, this option
                           is only available while bitcount equal 8 (-b 8)
    -m                   : Set output to multi-page TIFF file, the
                           default is output to single page TIFF files
    -r [resolution]      : Set resolution in generated image files
        -r 300           : Set horizontal and vertical resolution to 300 DPI
        -r 200x300       : Set horizontal and vertical resolution to 200x300 DPI
        -r 204x98        : Set horizontal and vertical resolution to 204x98 DPI
    -f [first Page]      : First page to convert
    -l [last Page]       : Last page to convert
    -c [compress]        : Set compression method in generated image

Please get more information of them on homepage. By those two software, we can convert Postscript to image, postscript to text easily. 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)