LibreOffice 4.3 does not convert to PDF (command line), but no errors reported - pdf

We are running Fedora on a dedicated server:
Linux host.**obscured**.<tld> 2.6.18-348.6.1.el5 #1 SMP Tue May 21
15:29:55 EDT 2013 x86_64 x86_64 x86_64 GNU/Linux
One important aspect of our web application is the ability to upload all types of documents, such as Open Office or Microsoft, and convert them dynamically to PDF, so they can be displayed on the site, and also using a JPG thumbnail created from the PDF asset.
Until recently, this function worked great, using LibreOffice 4.0. We used the soffice binary to dynamically convert uploaded files in a background shell command.
Then suddenly, LibreOffice stopped working, and we could not restore it, so we downloaded and installed LibreOffice 4.3.
The program now works, in the sense that it no longer bombs when forking off a the process, but the conversion no longer works, and doesn't produce any output or errors:
We essentially use the same syntax as from LibreOffice 4.0, which used to work correctly:
/opt/libreoffice4.3/program/soffice --headless --convert-to pdf --nofirststartwizard
--outdir **obscured** --nofirststartwizard **obscured**.docx
(I have obscured certain information here, intentionally, for the privacy of our users)
Again, this same syntax used to work with LibreOffice 4.0, until it broke, presumably due to an update of Java JRE on the server (we're not 100% sure...)
I cross-checked the syntax against online resources.
There was also mention of not being able to convert when another LibreOffice instance is running, and I checked that this was the only process!
Any thoughts or ideas will be appreciated, as this function is an important part of the application user experience

I have the same problem, after I 've used strace , I could see that fonts are missing.
http://ask.libreoffice.org/en/question/30069/pdf-font-embedding-in-libreoffice-42/

Related

wkhtmltopdf goes extremely slow on different environment

I am developing a PHP web application with CakePHP 3.4 framework, and i am using wkhtmltopdf 0.12.4 to output dynamic content in a .pdf file. Currently i'm using three different environments where i develop and test my application:
In my local environment (XAMPP 32-bit for Windows), wkhtmltopdf works great. It takes ~1 second in rendering .pdf files
In a remote testing environment (CentOS 7 64-bit using apache2, 4GB memory), works great too.
In my third remote testing environment (Another CentOS 7 64-bit distro with similar CPU specs as the second one and 4GB memory), wkhtmltopdf takes up to 20 seconds in rendering the same .pdf file
What could be causing this behavior in the third environment? How can i monitor or debug wkhtmltopdf process to help me identify why .pdf rendering is so slow?
Remove rgba and set border-radius to 1px in your CSS files (or completely remove them if they are not needed). That should speed up the PDF generation process.
Similar issue
Another reson can be your current default printer on windows. See:
https://github.com/wkhtmltopdf/wkhtmltopdf/issues/4891
If you use a standard printer that is
a network printer
you use the windows default driver for that printer and have not installed the manufactors printer driver
-> wkhtmltopdf is really slow

Problems with Octave on Windows 8: crashes after any error

I have installed (and re-installed) Octave 3 times on Windows 8, and I still can't get it right. The first and most obvious problem is that the prompt is missing; the screen only shows the flashing underscore that follows the prompt. This is not a major problem since the system properly responds to commands.
The major problem is that Octave crashes whenever it encounters a syntax error, instead of politely giving a diagnostic. This makes for extremely tedious software development.
Is there a way around this problem, or do we just have to wait for one side or the other to come up with an accommodation?
I encountered the same problem. I solved it by this:
create a shortcut to octave.exe, then right click->property-> change the "target" to something like:
C:\Program Files\Octave\Octave3.6.*_gcc*.*.*\bin\octave.exe -i --line-editing
Then it won't exit if u have syntax errors.
I don't understand the meaning of the parameters yet.
reference:
http://exciton.eo.yzu.edu.tw/~lab/?p=1121
Type octave --help can check the meaning of parameters.
-i also --interactvie, to force Octave interactive behavior.
Maybe Octave run at non-interactive mode at default, that means prompt should not be shown and it should terminate immediately when encountered error when reading a file.
I don't know if this will solve your problem, or if this is too bloated of a solution for you, but I use Octave on Windows 7 through Cygwin without any problems.
If you can't get Octave to run on Windows 8, you may consider running Octave through Linux via computer virtualization technology (virtual computer). Two, off the top of my head that you could use are VirtualBox by Oracle or VMWare Player
Once you have it installed, you can go to any number of sites that have pre-built Linux images that you can download and then run inside of Windows 8.X. Do a Google search of for 'Virtualbox images' or as 'VMWare appliances'. You can then download and use that to run the lastest version of Octave. I hope that helps.
Cheers,

running .net(mono) application in both linux and windows

I have created a c# application in ubuntu using monodevelop. It is running well in ubuntu.
I tried to run that application(firstgtk.exe file created after running in ubuntu)in windows.But it showing error message.How can i make to portable in both linux and windows?
The error message is:
when i click the firstgtk.exe file, a command prompt has come.It is blank. At the same moment microsoft message(send Error report or don't send):
firstgtk has encountered a problem and needs to close.
When i click don't send button, command prompt and message box are gone.
Mono compiles down to CIL code and is completely portable to .NET or Mono on other platforms. I can compile my C# code on a Mac and run the resulting EXE on Linux or Windows under either .NET or Mono.
Without the actual error message we can only guess the issue here. That said, in my experience, the most common reasons an application written in Mono on Linux/UNIX would create an error on Windows are pathnames with platform specific path separators or case sensitivity issues. The Windows file system is not case sensitive but they are on Linux/UNIX.
Another possibility is that you are using Mono on one platform and trying to run it on .NET on the other. Mono ships with a number of libraries that are not present in .NET on Windows.
Actually, I guess a final possibility is that GTK# is a common way to produce GUI code on Mono. GTK# relies on the GTK+ C library being present which is very common on Linux but unlikely on Windows unless it has been explicitly installed.
We really need to know what the error message was.
If you're using Gtk#, your app is portable between Windows and Linux. My guess is that you don't have Gtk# installed correctly (or at all?) on Windows. You can download from here. As of this time the latest version is 2.12.10.
Your code should be portable between Linux and Windows. Alas, the binaries are not. ...
Edit: As commenters have pointed out, Mono does produce and use PE executables, though other issues may limit portability.

MonoDevelop -- GTK Designer just shows a blank square?

I am having problems getting the GTK designer to work with MonoDevelop. I tried 2.4 on Arch Linux and it gave this problem. Then I tried 2.2 on OpenBSD and it gives the exact same problem. Both machines are 64bit.
Instead of having a window to drag things on I just have a blank square:
alt text http://img96.imageshack.us/img96/4766/monodevelop.png
The tutorials I've seen look similar to this though:
alt text http://monodevelop.com/#api/deki/files/142/=Stetic_Tutorial_06.jpg?size=bestfit&width=700&height=425
So what gives? With my blank square I can't drag anything onto it, not a VBox or other container even. It will not react to anything.
Am I missing some sort of GTK# configuration or what? I find it highly improbable that both OSs' packages I tried are broken. Also, I've attached a (huge) bounty to this because this is a pretty big issue for me.
The console output from the starting of Mono and including me trying to drag an element onto the gray box is here
Update
Ok, so I've finally gotten a bit closer to solving the mystery. I use Fluxbox as my window manager usually. Well I tried using both KDE and Gnome-Session and both of them cause MonoDevelop to work properly(though still missing the window border, you could at least drag components onto it). Now my question is what makes Fluxbox not work for it?
I have the same problem in openSUSE 11.3 x64 KDE using Mono JIT compiler version 2.6.7 (tarball Wed Jul 14 18:00:23 UTC 2010) downloaded from here
type -a monodevelop returns:
monodevelop is /usr/bin/monodevelop
monodevelop is /usr/bin/X11/monodevelop
Running monodevelop from terminal gives the following output
1)
WARNING: Cannot find Mozilla directory
containing libgtkembedmoz.so. Some
Addins may not be able to function.
Please set MOZILLA_FIVE_HOME to your
Mozilla directory.
This can be solved by adding an environment variable in your .bashrc file from your home directory.
export MOZILLA_FIVE_HOME='/path/to/libgtkembedmoz.so/directory/'
To find if that library exists on your systems use:
sudo find / -name libgtkembedmoz.so
-print
(from this bug report this library is contain in the Mozilla's XUL Runner package, but in newer versions I don't know if it's still there, I had to use libgtkembedmoz.so provided by Slickedit which was installed in /opt/slickedit/bin/mozilla/)
2)
WARNING [2010-07-29 20:22:37Z]: Inotify watch limit is too low (8192).
To resolve this problem read Inotify Watches Limit
3)
WARNING [2010-07-29 20:22:37Z]: Error creating composed icon gtk-execute___asm0__debug-overlay-22.png__SmallToolbar at size SmallToolbar. Icon __asm0__debug-overlay-22.png__SmallToolbar is 22x22, expected 16x16.
I get the exact same error using Monodevelop 2.4, and I think this could be either from a broken GTK# installation or from a bug in Monodevelop,
Your result is the same as mine, see here. I suggest compiling MonoDevelop from Github and/or using a newer version of gtk-sharp/gdk-sharp
This part
ERROR [2010-07-29 20:22:37Z]: GdkPixbuf-Critical: gdk_pixbuf_composite: assertion `dest_x >= 0 && dest_x + dest_width <= dest->width' failed
appears in GTK and GDK crashes,
If this does not resolve the problem submitting a bug report is the next option. Although this is somehow strange, since I managed to complete the same tutorial using Kubuntu 10.04 LTS 64 bit a few weeks ago.
Uh, that is the designer. If the toolbox didn't show up, go to View->Pads->Toolbox to bring it up.
Note that this Gtk, you can't just drop a button or textbox on the design surface. You have to drop a container control first, and then can place buttons and such inside the container.
set global gtk theme to default
check all bindings depends
try start monodevelop from console and post output on pastebin
"Now my question is what makes Fluxbox not work for it? " remember the GTK protect was made for GNOME project, all the libraries are made to work on that Desktop. so need to see all the dependencies to run it property

How can I programatically convert SVG files containing text to PDF files (specifically on CentOS 5.3 x86_64)?

I would like to programatically convert SVG files to PDF files. However, the SVG files contain text that must be searchable in the generated PDF files. Also, it has to work on Red Hat Enterprise Linux 5.3 or CentOS 5.3 for the x86_64 architecture. It would be nice if it were Open Source or at least not very expensive.
Here is what I've tried. All of these, except Batik, work fine on Debian Lenny.
Inkscape
I can get it installed using autopackages from http://inkscape.modevia.com/ap, but when I use it from the command line, the text is not searchable.
Batik rasterizer [sic]
When it converts SVG files to PDF files, the text is no longer searchable.
svg2pdf
The source for this and several of its dependencies are available to download. I have been trying to get it to compile on CentOS, but haven't had success yet. I found a precompiled version for Debian x86_64, but it doesn't work on CentOS.
rsvg-convert
Generated PDF isn't searchable on CentOS 5.3. Perhaps installing a newer version of cairo would help. Thanks to DaveParillo for mentioning rsvg-convert (on superuser).
SOLUTION (but perhaps some of the above will still be useful to the reader)
princeXML
It works fine on CentOS when installed from source. For some reason it doesn't work when installed from the .rpm. Thanks Erik Dahlström!
Cross posted on superuser
You could try princexml, it's free for non-commercial use.