file-conversion

Converting xlsx, docx, pdf files as jpg images using PHP

本小妞迷上赌 提交于 2019-12-12 03:07:13
问题 Is there any way to convert xlsx, docx and pdf files to image(jpg) format programtically using PHP? I need to read this files from a server and convert them as images and show on page. Thanks in adv 回答1: If you want to achieve this you must first convert your xlsx or docx to pdf The best way to do it is to install libreoffice on your server. Then use the headless command of libreoffice to perform the conversion to pdf shell_exec('libreoffice --headless -convert-to pdf fileToConvert.docx

How do i convert wav file to mp3 file if i have url of file using php?

佐手、 提交于 2019-12-12 01:29:33
问题 I have a url of the wav file http://xyz.com/recordings/employees/test.wav What i want to know is how can i change this file into mp3 format and store it in a particular location using php script because this file is located in some other server? I know about ffmpeg but not sure whether it will work or not. 回答1: I hope you have linux: exec('wget http://xyz.com/recordings/employees/test.wav'); exec('ffmpeg -i test.wav test.mp3'); exec('mv test.mp3 /youlocation/test.mp3'); 回答2: Thats usually no

Import a txt file into excel and format with text to column

依然范特西╮ 提交于 2019-12-11 11:14:33
问题 I am attempting to import a .txt file into Excel via VBA code and then format the content with a text to column command. The txt file holds content in the following: DATE | 1 | 2 | 3 | 4 | Something ||||| Not Sure ||||| DATE | 5 | 6 | 7 | 8 | New ||||| Whatever ||||| Currently, using code I've found and slammed together, I've managed to get this far Sub Sample() Dim MyData As String, strData() As String, myFile As String myFile = Application.GetOpenFilename() Open myFile For Binary As #1

What is the most efficient technique to convert PDFs to images on Linux command line?

扶醉桌前 提交于 2019-12-11 10:48:35
问题 I have a PDF page of n pages as input. On every m-th page, there is a area which I want to crop and save as an image. Concrete example: 500 page PDF on every 10th page, I want to crop the area from point (10,10) to (110,110) and save it as a single image I think the best solution would be a tool which could do this with just one command line call, so that there is no need for programming with iterations / passing outputs as inputs to other calls. Unfortunately, I haven't found such a tool.

Converting .pdf files to excel (.xls)

自古美人都是妖i 提交于 2019-12-11 06:03:16
问题 A friend of mine doing an internship asked me 2 hours ago if I could help him avoid to do manually 462 pdf file to .xls using free online soft. I thought of a shell script using unoconv , but I didn't find out how to use it properly, and I am not sure if unoconv can solve this problem since it mainly converts file to pdf, not the reverse thing. 回答1: Conversion from PDF to any other structured format is not always possible and not generally recommended. Having said that, this does look like a

How to convert a word document to a text file in c# without using microsoft.office.interop?

心已入冬 提交于 2019-12-11 05:29:01
问题 I have plenty of different versions of word documents which have to be converted to text files. I hope this link brings you right way How to extract text from Word files using C#? I want to read the content of the word document and remove all the formats(just have words in text files). I have done by using microsoft.office.interop(here, always instantiate a Word on the client) which is not recommended. So I am trying to create a c# project which should convert word to text automatically. Can

These python functions in c++? [closed]

旧街凉风 提交于 2019-12-11 05:07:47
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 5 years ago . I basically have some source-code(not my own) in python that I would like to understand. It's an anti-aliased xor audio oscillator. I don't know python at all - but it's quite readable except for a few things: Firstly - the full code: f0 = 500. fs = 44100. T0 = f0/fs P0 = fs/f0 t = arange(0,3*fs) L

Convert PDF to PostScript

放肆的年华 提交于 2019-12-10 12:16:23
问题 I need to convert a PDF file to PostScript using C#. Is it possible without using a third-party DLL? Or is there an open source project for the same? 回答1: The "cheapest" way to do this (I will not give my definition of 'cheap' in this context, though) would be to call one of the commandline utilities out there which can convert PDF to PostScript: gswin32c.exe (Win), gs (*nix): Ghostscript, multiplatform, GPL v3 license,... pdftops.exe (Win), pdftops (*nix): part of XPDF by Foolabs,

Open Source libraries for PDF to image conversion [duplicate]

谁说我不能喝 提交于 2019-12-09 06:55:27
This question already has answers here : Closed 7 years ago . Possible Duplicate: Export PDF pages to a series of images in Java Please suggest some good java libraries which can be used for a PDF file to image conversion. I tried using PDFBox: http://pdfbox.apache.org/ but after conversion to image most of my text from the pdf file was garbled in the image. It read a 'T' as a 'Y' a 'C' as a '#' and so on. Following is the code snippet I used for the same: PDDocument document = null; document = PDDocument.load( pdfFile ); List pages = document.getDocumentCatalog().getAllPages(); for( int i

Open Source libraries for PDF to image conversion [duplicate]

拈花ヽ惹草 提交于 2019-12-08 08:01:51
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: Export PDF pages to a series of images in Java Please suggest some good java libraries which can be used for a PDF file to image conversion. I tried using PDFBox: http://pdfbox.apache.org/ but after conversion to image most of my text from the pdf file was garbled in the image. It read a 'T' as a 'Y' a 'C' as a '#' and so on. Following is the code snippet I used for the same: PDDocument document = null; document