Posts Tagged ‘Convert’
Thursday, February 21st, 2019Reading Time: 3minutes

If you have installed Squid Cache Proxy recently and you need to watch who is accessing the proxy and what Internet (website is viewed) under /var/log/squid/access.log /var/log/store.log /var/log/access.log etc., you will be unpleasently surprised the log's records are logged in a weird human unreadable format called UTC as Squid Proxy server does not store the date / year / hour time information in a human readable format.
Squid uses the format:
<UNIX timestamp>.<Centiseconds> and you have to be a robot of a kind or a math genious to read it 🙂
To display Squid Proxy log in a human readable, luckily you can use below one-liner regular expression.
cat access.log | perl -p -e 's/^([0-9]*)/”[“.localtime($1).”]"/e'
If you have to review squid logs multiple times and on a regular basis you can either set some kind of cmd alias in $HOME/.bashrc such as:
alias readproxylog='cat access.log | perl -p -e 's/^([0-9]*)/”[“.localtime($1).”]"/e'
Or for those who prefer beauty install and use a log beatifier / colorizer such as ccze
root@pcfreak:/home/hipo# apt-cache show ccze|grep -i desc -A 3
Description-en: robust, modular log coloriser
CCZE is a robust and modular log coloriser, with plugins for apm,
exim, fetchmail, httpd, postfix, procmail, squid, syslog, ulogd,
vsftpd, xferlog and more.
Description-md5: 55cd93dbcf614712a4d89cb3489414f6
Homepage: https://github.com/madhouse/ccze
Tag: devel::prettyprint, implemented-in::c, interface::commandline,
role::program, scope::utility, use::checking, use::filtering,
root@pcfreak:/home/hipo# apt-get install –yes ccze
tail -f /var/log/squid/access.loc | ccze -CA
ccze is really nice to view /var/log/syslog errors and make your daily sysadmin life a bit more colorful
tail -f -n 200 /var/log/messages | ccze

For a frequent tail + ccze usage with ccze you can add to ~/.bashrc following shell small function
tailc () { tail $@ | ccze -A }
Below is a list of supported syntax highlighting colorizer:
$ ccze -l
Available plugins:
Name | Type | Description
————————————————————
apm | Partial | Coloriser for APM sub-logs.
distcc | Full | Coloriser for distcc(1) logs.
dpkg | Full | Coloriser for dpkg logs.
exim | Full | Coloriser for exim logs.
fetchmail | Partial | Coloriser for fetchmail(1) sub-logs.
ftpstats | Full | Coloriser for ftpstats (pure-ftpd) logs.
httpd | Full | Coloriser for generic HTTPD access and error logs.
icecast | Full | Coloriser for Icecast(8) logs.
oops | Full | Coloriser for oops proxy logs.
php | Full | Coloriser for PHP logs.
postfix | Partial | Coloriser for postfix(1) sub-logs.
procmail | Full | Coloriser for procmail(1) logs.
proftpd | Full | Coloriser for proftpd access and auth logs.
squid | Full | Coloriser for squid access, store and cache logs.
sulog | Full | Coloriser for su(1) logs.
super | Full | Coloriser for super(1) logs.
syslog | Full | Generic syslog(8) log coloriser.
ulogd | Partial | Coloriser for ulogd sub-logs.
vsftpd | Full | Coloriser for vsftpd(8) logs.
xferlog | Full | Generic xferlog coloriser.
At many cases for sysadmins like me that prefer clarity over obscurity, even a better solution is to just change in /etc/squid/squid.conf
the logging to turn it in human-readable form, to do so add to config somewhere:
Logformat squid %tl.%03tu %6tr %>a %Ss/%03Hs %
You will get log output in format like:
18/Feb/2019:18:38:47 +0200.538 4787 y.y.y.y TCP_MISS/200 41841 GET https://google.com – DIRECT/x.x.x.x text/html
SQUID's format recognized parameters in above example are as follows:
% a literal % character
>a Client source IP address
>A Client FQDN
>p Client source port
la Local IP address (http_port)
lp Local port number (http_port)
sn Unique sequence number per log line entry
ts Seconds since epoch
tu subsecond time (milliseconds)
tl Local time. Optional strftime format argument
default %d/%b/%Y:%H:%M:%S %z
tg GMT time. Optional strftime format argument
default %d/%b/%Y:%H:%M:%S %z
tr Response time (milliseconds)
dt Total time spent making DNS lookups (milliseconds)
Tags: Convert, Human, proxy, readable, squid, timestamp
Posted in Linux, Various | 2 Comments »
Friday, September 1st, 2017Reading Time: < 1minute

These commands allow you to convert certificates and keys to different formats to make them compatible with specific types of servers or software. For example, you can convert a normal PEM file that would work with Apache to a PFX (PKCS#12) file and use it with Tomcat or IIS.
Tags: Convert, DER, file, IIS, make, openssl, pem, PKCS, private key, specific
Posted in File Convert Tools, System Administration, Various, Web and CMS | 1 Comment »
Friday, April 15th, 2011Reading Time: 2minutes

If you're on Linux the questions like, how can I convert between video and audio formats, how to do photo editing etc. etc. have always been a taugh question as with it's diversity Linux often allows too many ways to do the same things.
In the spirit of questioning I have been recently curious, how can a subtitles be added to a flash video (.flv) video?
After some research online I've come up with the below suggested solution which uses mplayer to do the flash inclusion of the subtitles file.
mplayer your_flash_movie.flv -fs -subfont-text-scale 3
While including the subtitles to the .flv file, it's best to close up all the active browsers and if running something else on the desktop close it up.
Note that above's mplayer example for (.srt and .sub) subtitle files example is only appropriate for a .flv movie files which already has a third party published subtitle files.
What is interesting is that often if you want to make custom subtitles to let's say a video downloaded from Youtube on Linux the mplayer way pointed above will be useless. Why?
Well the Linux programs that allows a user to add custom subtitles to a movie does not support the flv (flash video) file format.
My idea on how to create custom subtitles and embed them into a flv movie file is very simple and it goes like this:
1. Convert the .flv file format to let's say .avi or .mpeg
2. Use gnome-subitles or subtitleeditor to create the subtitles for the .avi or .mpeg file
3. Convert back the .avi/.mpeg file with included subtitles to .flv (flash video format)
This methodology is really long and time consuming, but pitily as far as my understanding goes it's the only way to do that on your Linux until now.
To make the conversations between .flv and .avi format you will need to use the ffmpeg – (FFMpeg command line tool video converter), here is how:
– Convert .flv to .avi
debian:~# /usr/bin/ffmpeg -i input_flvfilename.flv output_avifilename.avi
– Convert .avi file to .flv
debian:~# /usr/bin/ffmpeg -y -i /path/to/your/avi/input_avifilename.avi -acodec mp3 -ar 22050 -f flv
/path/to/your/flv/output_flvfilename.flv
The required overall tools which you will have to have installed on your Debian or Ubuntu Linux are:
1. ffmpeg
2. gnome-subtitles
3. subtitleeditor
4. mplayer
You will also have to spend some time to get to know gnome-subtitles or subtitleeditor, but it won't be that long until you get the idea on how to use them.
Tags: and, avi, avi file, avi format, avi mpeg, close, command line tool, consuming, conversations, Convert, custom, Desktop, editing, editor, ffmpeg, file, Flash, flv file format, format, Gnome, How to, inclusion, Linux, linux programs, methodology, movie file, movie files, mpeg, mpeg file, mplayer, party, photo editing, something, subtitle editor, subtitle files, subtitles, taugh, time, time consuming, tool, Ubuntu, use, video, video converter, video file, youtube
Posted in Linux, Linux and FreeBSD Desktop, Linux Audio & Video | 9 Comments »
Tuesday, November 2nd, 2010Reading Time: < 1minute
You will need png2ico
First you will have to download the png2ico source
Now you will have to download compile and install the program by issuing:
debian:~# wget http://www.winterdrache.de/freeware/png2ico/data/png2ico-src-2002-12-08.tar.gz
debian:~# tar -zxvf png2ico-src-2002-12-08.tar.gz...
debian:~# cd png2ico/
debian:/root/png2ico# make
debian:/root/png2ico# cp -rpf png2ico /usr/local/bin/
Convertion is pretty easy and it comes to executing simply:
debian:/home/hipo$ png2ico favicon.ico png_picture_to_convert.png
Note that your png_picture_to_convert.png has to be in a graphic dimensions of 16×16
That’s all now you should have your favicon.ico on your Linux created.
Tags: Convert, Convert png files to ico on Linux, data, debian cd, download, gz, Linux, make, png, program, root, src, tar, zxvf
Posted in Linux | 5 Comments »
Friday, April 8th, 2011Reading Time: < 1minute
I needed to convert a bunch of files from WAV to MP3 format on my Linux desktop.
I’ve placed all my wav files to the directory /home/hipo/wav
And then I issued the small one liner script to convert the .wav files to .mp3 using the niftly lame linux mp3 convertor.
Here is how I did it:
linux-desktop:~$ cd wav
linux-desktop:/home/hipo/wav$ for i in *.wav; do
new_name=$(echo $i |sed -e 's#wav#mp3#g');
lame -V0 -h -b 160 --vbr-new "$i" "$new_name";
done
After executing the little script you might go and have a coffee, if you have thousands of files, each file convertion takes about 10-15 seconds of time (speed depends on your CPU).
Here is some output from a lame convertion to mp3 taking place:
Encoding as 8 kHz single-ch MPEG-2.5 Layer III VBR(q=0)
Frame | CPU time/estim | REAL time/estim | play/CPU | ETA
27237/27237 (100%)| 0:12/ 0:12| 0:12/ 0:12| 155.89x| 0:00
64 [27237] ***************************************************************
----------------------------------------------
kbps mono % long switch short %
64.0 100.0 84.1 8.9 7.0
If you want to save my convertion quickly for a later, download my Convert WAV to mp3 from a directory with lame shell script here
Actually there are plenty of other ways to convert wav to mp3 on Linux through mplayer, ffmpeg even with mpg123.
There are also some GUI programs that could do the convertion like winff , however for some weird reason after installing WinFF on my debian it was not able to complete convertion to mp3?!
But it doesn’t matter, the good news is I did what I wanted to via the simple lame program and the above script, hope it helps somebody out there.
Tags: coffee, Convert, convertion, convertor, cpu time, Desktop, desktop cd, download, estim, eta, ffmpeg, file, format, Frame, gui programs, hipo, linux desktop, linux mp3, mpg, mpg123, place, real time, reason, script, Shell, shell script, time, time speed, v0, VBR, WAV, wav files, wav mp3, weird reason, WinFF
Posted in Linux and FreeBSD Desktop, Linux Audio & Video | 8 Comments »
Friday, November 16th, 2012Reading Time: 2minutes

If you need to convert Adobe PDF to Plain Text on Linux or FreeBSD, you will have to take a look at a poppler-utils – (PDF Utilities).
For those who wonder why you need at all a .PDF in .TXT, I can think of at least 4 good reasons.
PDF to text convertion on Linux and other UNIX-es is possible through a set of tools called poppler-utils
poppler-utils is installable on most Linux distributions on Debian Ubuntu based Linux-es it is installable with the usual:
noah:~# apt-get install --yes poppler-utils
....
On Fedora it is available and installable from default repositories with yum
[root@fedora~]# yum -y install poppler-utils
On Mandriva Linux:
[root@mandriva~] # urpmi poppler
....
On FreeBSD (and possibly other BSDs) you can install via ports or install it from binary with:
freebsd# pkg_add -vr poppler-utils
....
Here is a list of poppler-utils contents from the .deb Debian package, on other distros and BSD the /bin content tools are same.
noah:~ # dpkg -L poppler-utils|grep -i /usr/bin/
/usr/bin/pdftohtml
/usr/bin/pdfinfo
/usr/bin/pdfimages
/usr/bin/pdftops
/usr/bin/pdftoabw
/usr/bin/pdftoppm
/usr/bin/pdffonts
/usr/bin/pdftotext
1. Converting .pdf to .txt
Converting whole PDF document to TXT is done with:
$ pdftotext PeopleWare-Productive_Projects.pdf PeopleWare-Productive_Projects.txt
2. Extracting from PDF to Text file only selected pages
Dumping to .TXT only specific pages from a PDF file: is done through -f and -l arguments (First and Last) pages number.
$ pdftotext -f 3 -l 10 PeopleWare-Productive_Projects.pdf PeopleWare-Productive_Projects.txt
3. Converting PDF to TXT protected with password
$ pdftotext -opw 'Password' Password-protected-file.pdf Unprotected-file-dump.txt
the -opw arguments stand for 'Owner Password'. As suggested by man page -opw will bypass all PDF security restrictions. In PDFs there are file permission password protection as well as user password.
To remove permissions password protection of file
$ pdftotext -upw 'Password' Password-protected-file.pdf Unprotected-file-dump.txt
4. Converting .pdf to .txt and setting type of end of file
Depending on the type of Operating System the TEXT file will be red further, you can set the type of end of lines (for those who don't know it here is the 3 major OSes UNIX, Windows, and MAC end of line codes:
DOS & Windows: \r\n 0D0A (hex), 13,10 (decimal)
Unix & Mac OS X: \n, 0A, 10
Macintosh (OS 9): \r, 0D, 13
$ pdftotext -eol unix PeopleWare-Productive_Projects.pdf
PeopleWare-Productive_Projects.txt
The -eol accepts (mac, unix or dos) as options
A bit off topic but very useful thing is to then listen to converted .txt files using festival.
5. Reading .PDF in Linux Text Console and Terminals
$ pdftotext PDF_file_to_Read.pdf -
Btw it is interesting to mention Midnight Commander( mcview ), component which supports opening .pdf files in console uses pdftotext for extracting PDFs and visualizing in plain text in exactly same way
Well that's it happy convertion.
Tags: Convert, Files, freebsd, Linux, pdftotext, plain
Posted in Everyday Life, Linux, Linux and FreeBSD Desktop, Various | No Comments »
Tuesday, November 13th, 2012Reading Time: 4minutes

On Linux, there are plenty of ways nowadays to convert Microsoft Word or OpenOffice .DOC documents to Adobe's PDF (Postscript). However most of the ways require a graphical environment. As I'm interested in how convertion is done mainly from console to suit shell scripts and php which has to routinely convert a bunch of .DOC files to .PDF. I've checked today how PDF to DOC is possible on Debian, Ubuntu, Arch Linux and FreeBSD..
There are few tools one can use from console, that doesn't requiere you to have running Xorg on the convertion host. The quality of the produced converted document, may vary and with some Microsoft Office doc files, there might be some garbage. But generally for simplistic and well written "macros" free documents the quality of PDF is satisfactory with few of the tools.
Here I will list the few tools, one can use for convertion:
- abiword – you probably know abiword GUI program which is a good substitute for people who doesn't want the huge openoffice on the host. interestingly abiword supports converts with no need for GUI
- wvPDF (you have to have install wv package and usually this converter works well only with very old .DOC (MS Office 97) – I was not impressed with those convert results
- oowriter / swriter (whether LibreOffice installed) or writer (on LibreOffice), on some Ubuntus and derivatives the equivalent cmd is lowriter
- unoconv – this tool produces really good DOC to PDF converts, it is a python script using openoffice / libreoffice as backend convertion engine so produced PDFs will be identical like the ones produced with oowriter, the pros of the tool is its syntax is very user friendly and along with PDF to DOC it supports easy syntax converting to bunch of other file formats. Actually unoconv supports same convertions which supported by OpenOffice.org, the advantage is however you can use it within console and even schedule convertion to be processed by a remote host.
1. Convertion of DOC to PDF with abiword
abiword --to=pdf doc_file_to_convert.doc
2. Convert DOC to PDF with wvPDF
apt-get install --yes wv texlive-base texlive-latex-base ghostscript
wvPDF doc-file-to-convert-to-pdf.doc converted-to-pdf.pdf
wvPDF doc-file-to-convert-to-pdf.doc convert-to-pdf.pdf
Current directory: /home/hipo/Desktop
"doc-file-to-convert-to-pdf.eps" exists - skipping...
Some problem running latex.
Check for Errors in steinway.log
Continuing...
The produced .pdf was not useful most of the text inside was completely missing as well as some weird probably PostScript convertion characters were in the .PDF. Seeing its output I would as of time of writing wvPDF Debian's verion 1.2.4 is crap.
3. Convert DOC to PDF with oowriter / swriter / lowrite
a) convert with oowriter and swriter
I saw posts online claiming DOC to PDF convertion is possible directly with oowriter or swriters with commands:
oowriter -convert-to pdf:writer_pdf_Export input-doc-file-to-convert.doc
or
swriter -convert-to pdf:writer_pdf_Export steinway.doc - as named on some Linux-es
As long as I tested it on my Debian Squeeze, neither of the two works
.I saw some suggestions that PDF can be generated by installing and using cups-pdf debian package:
apt-get install cups-pdf
oowriter -pt pdf your_word_file.doc
b) convert DOC to PDF with lowriter I've seen in Ubuntu documentation and in Ubuntu forums, users saying they had some good results using lowriter, which is a sort of front-end program to ImageMagick's convert. I never tested that but I doubt of any satisfactory results, as I tried converting to PDF earlier using convert and often converts failed. Anyways you try it with:
lowriter --convert-to pdf *.doc
4. Converting PDF to DOC with unoconv
As of time of writing it seemsunoconv is best Linux console tool for converting .doc to .pdf
It produces good readable text, as well as pictures and elements looks exactly as in OpenOffice.
To install it I run:
# apt-get install --yes unoconv
....
To use it:
$ unoconv -fpdf any-file-to-convert.doc
If you don't get errors or it doesn't crash a .doc file with same name any-file-to-convert.doc is created.
What unoconv, does is precisely the same as if using OpenOffice
GUI's to convert to PDF:
- Open -> Open Office (3.2 in my case)
- Open Document to export
- File->Export as PDF
- Click: Export
- Choose file namefor output PDF
An interesting feature of unoconv is its possibility to run and convert as a port listening server. I never used this but noticed it mentioned in manual EXAMPLE section:
EXAMPLES
You can use unoconv in standalone mode, this means that in absence of an OpenOffice listener, it will starts its own:
unoconv -f pdf some-document.odt
One can use unoconv as a listener (by default localhost:2002) to let other unoconv instances connect to it:
unoconv --listener &
unoconv -f pdf some-document.odt
unoconv -f doc other-document.odt
unoconv -f jpg some-image.png
unoconv -f xsl some-spreadsheet.csv
kill -15 %-
This also works on a remote host:
unoconv --listener --server 1.2.3.4 --port 4567
and then connect another system to convert documents:
unoconv --server 1.2.3.4 --port 4567
unoconv does not recognize wildcards like ' * ' , so in order to convert multiple DOC to PDF files one has to use the usual shell loop:
for i in *.doc; do unoconv -fpdf $i; done
From all my tests, I think unoconv is preferred tool for Linux and BSD users (good time to mention unoconv is available on FreeBSD too. BSD users can install it via port /usr/ports/textproc/unoconv)
Tags: console, Convert, convertion, inside, Linux, using
Posted in Linux and FreeBSD Desktop, Linux Audio & Video, System Administration, Various | 2 Comments »
Tuesday, July 24th, 2012Reading Time: 2minutes
I had to convert Adobe PDF file to Microsoft Word ( .doc) file on Microsoft Windows OS for a friend. There is plenty of software available to convert PDF to DOC on Windows, as well as few web-site services claiming to convert correcly PDF to DOC. Converting PDF to DOC is easy and can be done with Open Office, however the reverse process is a real pain in the ass. I tried a dozen of free web serviecs to convert an ancient Latin writting PDF to DOC but none of them couldn’t properly convert it. Failing with the web services as a tool to convert, I’ve turned to seeking a tool that will do the trick. After trying few PDF to DOC converters which failed to produce a properly structed edittable DOC from the PDF file, I’ve come across ABBYY PDF Transformer 2.0. Abbyy PDF Transformer finally did it …
I’ve tried hard to look for a free software good PDF to DOC converter alternative for Windows but it seems as of time of writing this post there is no GPLed free software that does properly convert PDFs to MS WORD DOC ….
Using Abbyy PDF Transformer 2.0 is a piece of cake all I had to do is select the PDF file (pressing Open PDF) and then click on Convert (in right bottom corner). Below is a shot of Abby PDF transformer in action.

Tags: action, Adobe, Auto, bottom corner, Click, Convert, converter, converters, Converting, converting pdf to doc, DOC, Draft, file, free software, GPLed, microsoft windows os, microsoft word doc, ms windows 2000, ms word doc, Open, open office, open pdf, pain, pain in the ass, pdf to doc, pdf to doc converter, pdf transformer, PDFs, piece of cake, plenty, shot, software, time, tool, transformer, transformer 2, Vista, web site services, windows 2000, Word
Posted in Everyday Life, Various, Windows | 3 Comments »
Sunday, February 26th, 2012Reading Time: 2minutes
In my last article, I've explained How to create PNG, JPG, GIF pictures from one single PDF document
Convertion of PDF to images is useful, however as PNG and JPEG graphic formats are raster graphics the image quality gets crappy if the picture is zoomed to lets say 300%.
This means convertion to PNG / GIF etc. is not a good practice especially if image quality is targetted.
I myself am not a quality freak but it was interesting to find out if it is possible to convert the PDF pages to SVG (Scalable Vector Graphics) graphics format.
Converting PDF to SVG is very easy as for GNU / Linux there is a command line tool called pdf2svg
pdf2svg's official page is here
The traditional source way compile and install is described on the homepage. For Debian users pdf2svg has already existing a deb package.
To install pdf2svg on Debian use:
debian:~# apt-get install --yes pdf2svg
...
Once installed usage of pdf2svg to convert PDF to multiple SVG files is analogous to imagemagick's convert .
To convert the 44 pages Projects.pdf to multiple SVG pages – (each PDF page to a separate SVG file) issue:
debian:~/project-pdf-to-images$ for i in $(seq 1 44); do \
pdf2svg Projects.pdf Projects-$i.SVG $i; \
done
This little loop tells each page number from the 44 PDF document to be stored in separate SVG vector graphics file:
debian:~/project-pdf-to-images$ ls -1 *.svg|wc -l
44
For BSD users and in particular FreeBSD ones png2svg has a bsd port in:
/usr/ports/graphics/pdf2svg
Installing on BSD is possible directly via the port and convertion of PDF to SVG on FreeBSD, should be working in the same manner. The only requirement is that bash shell is used for the above little bash loop, as by default FreeBSD runs the csh.
On FreeBSD launch /usr/local/bin/bash, before following the Linux instructions if you're not already in bash.
Now the output SVG files are perfect for editting with Inkscape or Scribus and the picture quality is way superior to old rasterized (JPEG, PNG) images
Tags: Auto, bash shell, bsd users, command line tool, Convert, Converting, convertion, crappy, deb, deb package, debian project, debian users, document, documentConvertion, Draft, editting, format, freak, GIF, gnu linux, graphic formats, Graphics, graphics format, graphics graphics, homepage, Image, image quality, ImageMagick, inkscape, issue, JPG, jpg gif, line, Linux, nbsp, number, package, page, pdf document, picture, png, png images, Projects, raster graphics, rasterized, Scalable, scalable vector graphics, Scribus, Shell, svg file, svg files, tool, traditional source, use, vector, way
Posted in Linux, Linux and FreeBSD Desktop, System Administration | 3 Comments »
Saturday, February 25th, 2012Reading Time: 2minutes
I've received a PDF file with a plan for development of a bundle of projects, My task was to evaluate this plan and give feeback on the 44 pages PDF document.
Since don't know of program to directly be able edit PDF files on GNU / Linux ?, my initial idea was to open and convert the PDF to ODT / DOC with OpenOffice (Libre Office) and then edit the ODT file.
Unfortunately Open Officeoowrite program was unable to open / visualize the PDF file. My assumption is OO failure to open the PDF is because the PDF was generated on Microsoft Windows with Adobe illustrator or smth.
The idea that came to my mind as alternative, way to edit the PDF file was to convert it in pictures edit and then convert the pictures to PDF.
In other words to follow these 3 steps:
1. Convert the PDF document to multiple images
2. Edit each of the images with GIMP or Inkscape
3. Convert back all images to a single PDF file
Some time ago, I've written an article how to create PDF file from many image files in JPEG, PNG or GIF on Linux
. This prior article was exactly describing how to complete Step 3.Therefore all left was to find a way to convert the PDF file to multiple JPEG / PNG / GIF images.
convert command to convert PDF document to multiple pictures which you can take from my earlier article is:
$ convert *.jpg outputpdffile.pdf
Actually in Step 1 I was aiming to do the opposite of what I've previously done.
Hence, in order to convert the singe Project.PDF file to multiple PNG images, I just switched convert IN / OUT arguments order.
hipo@noah:~/project-pdf-to-images$ convert Project.pdf Project.png
...
I've done the PDF to pictures conversion on my notebook running Debian Squeeze (6.0.2) GNU / Linux.Convertion of the PDF file to 44 images, took 25 seconds on my dual core 1.8 Ghz / 2GB RAM Thinkpad r61.
Afterwards, I've had at hand 44 PNG files generated, e.g.:
hipo@noah:~/project-pdf-to-images$ ls -al Project-*.png |wc -l
44
convert was also smart enough to produce correct file naming. The output file names were:
Project-1.png
Project-2.png
etc.
Nicely each number (-1.png) was corresponding to the respective PDF page. For instance Project-10.png was corresponding to page 10 of the Projects.PDF file
Rather ironically, after convertion of the PDF to pictures, while opening the Project-1.png, I've noticed The GIMP – (The GNU Image Manipulation Program) is capable of directly reading PDF files. GIMP has both the option to open files in layers or separate images 😉
Anyways even if GIMP is used to modify the different PDF pages as layers, once completed GIMP doesn't have the ability to save the file as PDF and therefore once saved the file if merging of layers is done the resulting picture becomes ONE BIG MESS.
Therefore it seems my the 3 steps way e.g.:
1. convertion PDF to pictures
2. picture edit with GIMP or Inkscape
3. convertion of pictures back to PDF
is still the only way to "modify PDF" in Linux or BSDs. I will be glad to hear if someone has come up with a better solution?
Tags: adobe illustrator, alternative, assumption, Auto, bundle, conversion, Convert, convertion, DOC, Draft, dual core, file, GIF, gif images, GIMP, hipo, how to create pdf file, illustrator, image files, initial idea, JPG, jpg gif, Libre, microsoft windows, multiple images, noah, noah project, odt, Open, open office, OpenOffice, page, pdf files, png, png files, png images, RAM, singe, smth, step 1, step 3, time
Posted in FreeBSD, Linux, System Administration | 3 Comments »