Programming :: Converting ODT File To PDF Using PHP
Apr 3, 2011
My problem is to convert an odt file to pdf using php. I wrote an article in odt and I'd want to download it in pdf from my site. I know "fpdf", but it doesn't convert from odt. Someone says to convert from odt to html then to pdf... but some others says NO! Well, do you know a way? (may be also different from odt to pdf, e.g. from latex to pdf).
I have managed to create a HTML file inside python code,convert this to a PNG file through a Python script ?
EDIT: Details added: I have a python script which generates map-legends in the form of an html file. The legend generated have to be pasted on a map which is in a png format. A png format file can be pasted on another png format file easily. But because the legends generated are in a html format I cannot paste it on the map file !!
EDIT: Details added: I did Googling first but it resulted in various soft wares for above purpose which I don't want !!
I have log files that everyday are downloaded from my webserver in the format: Code: samplesite.com.xxxxxxxxxxx.gz xxxxxxxxxx is a 10 digit epoch time. I am trying to figure out a way in batch to:
1. find all of exisiting files containing the pattern (after the first run it will only be one a day) 2. Isolate the epoch string 3. convert the epoch string to human readable date/time 4. rename the original file as samplesite.com.mmddYYYY.gz
I have converted a i336.rpm file into .deb file in ubuntu using alien successfully. but I am getting the following error while converting i586.rpm file of the same application into .deb file
Unpacking of 'app-1-1.i586.rpm' failed at /usr/share/perl5/Alien/Package/Rpm.pm line 155.
I'm working on a project where I am converting a C file to C++. I have worked out 99% of the errors but there is still one lingering one that I cant seem to figure out. I get the following error when compiling with g++
Code: mscp.cpp:749: error: invalid conversion from const void* to move mscp.cpp:750: error: invalid conversion from const void* to move
I've been converting some C code to assembly for my homework; it was going well but I'm having trouble with a for loop for hours. I could not understand where is the problem and decided to ask. I'm posting the part where I'm having trouble of my C-code and assembly-code; every other part of codes act same and the variable values are same. I'm waiting this two codes to act same, but they don't.
I wrote the following as our developers won't do it for us! The rest of my programming is in PHP, any ideas on how I can get this into php?I'm in the middle of writing a reminder system which involves importing the customer data and sending out reminder emails.All the script below does is download the current report $FILEIN, compare field number 6 ($DATA) with the date($DATE), if there is a match, it checks each line in the prescription_skus.csv to see if there is a match with field number 1 in the current report. It then outputs the entire line to $FILEOUT
I'm writing the Diffie-Hellman key exchange system using GMP to handle big integers. For the most part, everything works. I can convert the string to mpz_t, set up the keys and everything, and encrypt it fine. Its the decrypting I'm having issues with. What I'm using is mpz_xor() for both. To encrypt I'm doing mpz_xor(buffer, mpz_of_text, secret_key), and to decrypt I'm doing mpz_xor(buffer, mpz_of_cipher, secret_key).
For one character, it semi-works...it'll decrypt it fine, but it'll return it as it's ASCII value (i.e.: if I encrypt "A", it'll decrypt it as 65). Which, I can easily just do sprintf(decrypted_buffer, "%c", 65) for example and be fine. But, when I'm sending text bigger than one character, the encryption for AB gives me something like 1061043 after running the decrypting xor on it.
Has anyone ever done this before or can point me in some directions? Perhaps other algorithms to try? I know XOR isn't the most secure encryption method to use, but at the time I wasn't sure what else to use. I'm really just having a hard time trying to convert a mpz_t to a character string. I've looked at mpz_get_str() and it works before running encryption (i.e.: using mpz_set_str() to create a mpz of a string, then calling mpz_get_str() to change it back). Maybe my XOR method is wrong? Here's the code I'm using:
Code:
/** * str2mpz() * b The current buffer of text to convert [in] * m The mpz_t variable to store converted text [out]
I'm a C / assembler programmer so am not use to C++, which I need to use. Basically I'm using my own versions of memcpy, but for long and int rather than char. It's for fast graphics. So I have a char array which I copy to another array. But I copy as either longs or ints, much faster. for example
I have to write a code that converts a sequence of 1's and 0's(block) into their equivalent hexa number and copying to another array(byte). but this sequence is not always of length 8 and you are required to send strlen(sequence)%8 bits back into the string. So i've written down this code and it works well with the sample input but fails in the real program.
Code: int Convert_encode( char * block,unsigned char * byte) { int len,iter,i,j,k,sum; char * temp=(char *)malloc(4*sizeof(char)); len=strlen(block)/8;
I just purchased a new digital camcorder and after recording I realized that it records that the files were not in a format that I am use to. I need a program or code that I can use to convert these files into a format that I can watch and that I can manipulate to make a longer movie. Ubuntu 10.4
I'm trying to convert a 3gp (mobile phone video) file to PAL DVD format (which is I believe MPEG2 video and one of a few audio choices, in an MPEG PS container). But while the file plays fine in mplayer and vlc, my efforts to convert it, using either VLC or devede, always seem to result in either the converted video being speed up (noticeably, we're talking twice as fast or so not 5%), or in the audio going mickey-mouse. How can I get the file converted correctly? Bearing in mind it needs to be PAL not NTSC (so a lot of stuff I might find online isn't going to work as-is)
How would I go about converting a vob file to a DV-MOV or DV-AVI file? Would I have to convert each vob file individually or could I rip it straight from the DVD while watching it somehow?
I have to convert the following .bat file content in the .sh fileset "JAVA_OPTS=%JAVA_OPTS% -Djava.naming.factory.initial=org.jnp.interfaces.Na mingContextFactory" set "JAVA_OPTS=%JAVA_OPTS% -Djava.naming.provider.url=jnp://localhost:1099" set "SECURITY_OPTS= -Djava.security.auth.login.config=D:jboss-5.0.0.CR2-jdk6jboss-5.0.0.CR2serverdefaultconfjaas-standard.cfg"
I am in the process of learning some scripting, however I am running into a roadblock in specifying a certain time format in the array. Ideally I would like to use Here are the lines of text that I am interrogating:
I'm having some problem converting an mpg file to avi. I did it with mencoder. The result was an avi file as I wanted but the image was like stretched vertically. Like this: (The avi is on the left) What can I do to convert it without the stretching?
Can I ask for some advice in converting a video (from my phone) which is a 3gp file into something more universal. I use audokonverter for audio files and this gives me a menu right-click option to convert a song from (say) wav to mp3. Is there an equivalent for videos? I am using opensuse 11.4 64 bit and have mplayer, xine and vlc installed plus the necessary codecs. Or is it simpler to use ffmpeg in a c/l environment
I have a single VRO file from my camcorder, it is made up of about 100 different clips, they show up as individual clips on my camcorder, but only as a single file when I take it off the camera. Is there any program that can extract or split this file back up into the different clips? It's a pain trying to edit this when I may only need one clip out of it (total number of frames is over 132,000!
I have a sendmail alias configured to forward mails to pagers and it was working fine . The mail relays suddenly start converting a mail address of pager into a normal mail(outlook) format address. Say , instead of forwarding a mail to [URL] Provided no configuration inside the mail directory was changed.Which file is responsible in converting the mail-addresses? Is there any other problem with my mail-setup?
I'm running a blog on posterous. Some friends of me post messages there via mail, mostly with some PDF attachments. These PDFs are generated mostly on a MAC with Word. The standard extension of these files is foobar.doc.pdf. Unfortunately, Posterous ignores attachments with the extension .doc.pdf.
So, I'm looking for some workaround. For example, I could my web server with some script, which receives these mails, converts the filenames of the attachment in some way and posts the result to my posterous blog. Therefore I'm looking for some mail processing scripts, which enable me to do so.
I am new to scripting world and i have been assigned the task of converting some bat scripts to sh scripts because we migrate from Windows to Linux server.find below the .bat script.
rem ************************************************************************************* rem This script is used to get r2devices files. rem
I'm writing a PHP program. I've encountered a problem; in the following code I try to pass $_POST['delete'] which is an array as the value of a hidden input to some form, but it doesn't do so.there's something wrong with converting PHP array into HTML array. I'm sure that $_POST['delete'] is not null and is a real array.
i have problem in socket programming, while displaying received message in file,i got a problem... i cant able to write it in the file.... this is the code....
now my problem is run time error i can able to create file but i cant able to write file....log.txt contain nothing.... as here i have give sample code... dont say not initialising function and all.... i have initialised , please only see func1() - my problem is only not able to write msg which i got received from the client..