Can we print docx file without open with any office dll? - ms-office

Can I print and PDF docx file without open into winword by VSTO or OOXML from MS-office installed desktop/server? Is any DLL is there to do?
I need to make print and PDF bunch of files.

Yes you can:
there are lot's of libraries. Like:
Free Word API to Operate DocX documents - Convert your docx to pdf and then print it.
Apsose Word: It's some kind of the standard library to work with docx in .Net, but not really cheap.
In addition you can find some similar questions here and here.

Related

How to convert pdf to text file using vba but not using acrobat library

Would you please explain me on how to convert pdf file to text file using vba but not using acrobat libraries. As Acrobat libraries are not installed in my system, I am seeking alternative way. Thank You
Unfortunately there isn't an office object that supports the conversion of PDF to text. Alternatively you could write it in python using a conversion package ie tesseract and then access excel through openpyxl.

Unoconv - Maintain scaling converting xlsx to pdf

I'm using unoconv to convert an Excel file to PDF. The converted PDF retains the correct scaling when converting from an .xls file, however the PDF scaling reverts to 100% when converting from an .xlsx file. In other words, unoconv converts the same file, albeit with different extensions and Excel format, differently.
Operating system is Ubuntu. I'm running unoconv from the command line. I've scoured the web for a solution and have found none. I believe it's a bug in unoconv, i.e. unoconv does not seem to support maintaining the scaling when converting from .xlsx as it does when converting from .xls
Has anyone else encountered this and, if so, is there a workaround?
You could convert .xlsx files directly from Excel
File>Save As > Browse. change file extension to pdf from drop down menu.
or
File>Save as Adobe PDF and follow the dialog
this is at Office 2013

How to programmatically create MS Office .doc or .docx files on a linux server

In the past I've used catdoc for reading .doc files, but now I need to write them.
What is the best way to go about this? I don't need it to be perfect or fully featured.
a quick and dirty way would be, to write your file in HTML and save the file as .doc
Because word can open HTML you would have a Word File^^
Beware that if you open the file with word sometimes the "web-view-mode" is selected

Convert .xls to .pdf using LibreOffice via Command Line

I'm trying to convert a .xls file to .pdf using LibreOffice via command line on Ubuntu. I have a kind of report on the .xls file with some colors in the background of the cells and etc.
The problem is when I convert the .xls file, the .pdf loses the original format. Each page is broken almost in the half and the content of one page is displayed in two different pages.
Does anybody know how to convert the .xls file to .pdf via command line with keeping the original format?
Or some trick to set the size of the .pdf page to not break pages? (Also via command line)
The code I used to make the conversion was:
soffice --headless --convert-to pdf:"impress_pdf_Export" filename.xls
If you use LibreOffice to convert Microsoft Excel (XLS) files to PDF documents, this is a two-step process (even if your command does look like it is a one-step process):
Import the XLS into LibreOffice (even if started with --headless).
Export the PDF from LibreOffice.
If the result does not look like you expect (not similar enough to Excel's native PDF export), then start with debugging the first step from above:
Open the XLS file with LibreOffice in a GUI. Does it look like you expect it to look? Or are some formatting options looking weird?
Export the PDF from there (with the GUI). Are the page dimensions as you expect? Did you set them up how you prefer? The margins like you want them? etc.pp. ...
If you are working on Windows, you may also want to consider OfficeToPDF.exe. It is hosted on CodePlex, licensed with the Apache 2.0 License and available in binary and in source code.
It requires a working Office 2013, Office 2010 or Office 2007 installation. But then it can commandline- and batch-convert to PDF various MS Office-based file formats, including XLS(X), PPT(X), DOC(X), VSD(X) and PUB as well as Libre/OpenOffice-based ODT, ODS and ODC files.
Although this is a little bit off from the initial question (you don't _really need Office Libre if you have the Office suite and on a Windows machine)
I do appreciate the follow-up provided by Kurt. It prompted me to post the following Gist offering some clear instructions on how to go about using the .exe in a for loop.
https://gist.github.com/einsty/2189cae4175f619cff0f
Try copying appropriate font file (for me it's
a simsun.ttc file) to your libreoffice installing directory like '/opt/libreoffice4.2/share/fonts/truetype'.But if the width of a single excel sheet is too much for a print page(sth like 'A4'),it'll still collapse.

use OpenOffice Calc to open Excel files and convert to CSV or Tab-delimited

Is there any type of automation available where I can use OpenOffice Calc to open Excel files and convert them to CSV or tab-delimited files?
I'm currently using PHPExcel to open the files and iterate through them and import each row into a database but have begun to run into memory issues with large files and need another alternative.
These are xls and xlsx files so it has to work for all of them.
If there is, how would I go about programming this in PHP?
If you have other alternatives, please feel free to suggest them.
OpenOffice can be run in server mode and used to convert files between a number of supported formats.
I have used this mainly with Java thru the JODConverter library available at http://www.artofsolving.com/opensource/jodconverter
A quick websearch brought up http://sourceforge.net/projects/phopo-org/ which claims to be a PHP implementation

Resources