How to convert MS office to PDF in Linux?

Question: I am looking for an file conversion site which converts DOCX, DOC, PPT XLS...to PDF or JPG files using an API (C/C++/python library or module) in Linux. Openoffice is no lightweight enough. Is there any open source library or module? Is there any application which can do this on VeryPDF? Thank you.

Answer: When you need to convert MS Office to PDF under Linux by API from C++, maybe you can have a free trial of VeryPDF cloud based application named Office Document to PDF Converter Cloud API, by which you can convert MS Office DOC, DOCX, XLS, XLSX, PPT, PPTX, RTF, Text documents to PDF files from C++ easily. Meanwhile, this application also allows you to call it from C#, VB.NET, ASP.NET, ASP, PHP, Java, Ruby, Amazon, etc. Please check more information of this software on homepage, in the following part, I will show you how to use this software.

Converting MS Office to PDF

  • When using Office Document to PDF Converter Cloud API to convert MS Office to PDF, you do not have MS Office installed in your computer. The conversion could be done within VeryPDF cloud based server automatically.
  • Meanwhile you do not need to download any application, like PDF reader or download anything from our website before run the conversion.
  • Please open browser and then input URL following the above example then you can make the conversion done. Here is an example for your reference:
  • http://online.verypdf.com/api/apikey=XXXXXXXXXXXXX&app=doc2any&infile=http://online.verypdf.com/examples/cloud-api/verypdf.doc&outfile=verypdf.pdf
    By this URL, we can convert doc file to PDF without Office installed. Please note when converting by VeryPDF cloud based application, you need to upload local file to online version and then input the URL. Now it can not be used to convert local file to PDF in batch. Please change the API code to the real code or else there will be watermark on output.
    Here is another example for your reference:
    http://online.verypdf.com/api/apikey=XXXXXXXXXXXXX&app=doc2any&infile=http://online.verypdf.com/examples/cloud-api/verypdf.docx&outfile=out.pdf
    By this above link, we can convert docx file to PDF.

Converting MS Office to PDF from C++

  • When you need to run the conversion from C++, please refer to the following code templates:
  • 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.Serialization;
    using System.Net;
    using System.IO;

    namespace WindowsFormsApplication1
    {
        public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();
            }
            private void button1_Click(object sender, EventArgs e)
            {
                string url = "http://online.verypdf.com/api/?apikey=XXXXXXXXXXXXX&app=doc2any&infile=http://online.verypdf.com/examples/cloud-api/verypdf.xls&in_ext=.xls&outfile=verypdf.pdf";
                WebRequest request = HttpWebRequest.Create(url);
                WebResponse response = request.GetResponse();
                StreamReader reader = new StreamReader(response.GetResponseStream());
                string urlText = reader.ReadToEnd();
                MessageBox.Show(urlText);
            }
        }
    }

By this cloud based application, you can convert MS Office to PDF  under Linux system without any problem. 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: -1 (from 1 vote)

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *


Verify Code   If you cannot see the CheckCode image,please refresh the page again!