Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re: converting doc to pdf

by biohisham (Priest)
on Jul 04, 2011 at 08:55 UTC ( #912614=note: print w/replies, xml ) Need Help??

in reply to converting doc to pdf

There isn't a way out from having to deal with installing modules be it now -for this case- or later, a time will come where you may just need to do that. It serves two major advantages to know the following; how to install modules on your machine, how to read their documentations and how to consistently use them:
  • First, you don't reinvent the wheel (someone has figured a solution and was generous enough to contribute it to CPAN), so wizard-craft and witch-craft for that matter are to be based on using these magic boxes to your heart-content and imagination limits.
  • Second,OSOM (Out of Sight Out of Mind) quality, the burden of implementing mutli-step algorithms has been uplifted since many modules provide abstractions to tasks that could otherwise be lengthy to write (in terms of time and effort), think about writing a taxonomy tree algorithm for instance, or risky to write (computation inadvertent inaccuracies, buggy and error-prone) so having a module that has been already tested and used by many is a wiser option.

Not to deviate from the topic, in CPAN there are many PDF modules to enable manipulation of PDF files to different levels of complexity and they're robust and more appropriate to pick instead of thinking of writing your own code. If you have issues with installing modules you can read at the Tutorials the guides for Installing Modules ...

On another note, there are websites that do format conversions, however, they put a cap on the maximum file size you can submit, the output quality or the number of submission you're allowed, I find to be very good and reliable.

David R. Gergen said "We know that second terms have historically been marred by hubris and by scandal." and I am a two y.o. monk today :D, June,12th, 2011...

Replies are listed 'Best First'.
Re^2: converting doc to pdf
by kcella (Beadle) on Jul 04, 2011 at 15:55 UTC

    I was able to finally install tidyp and HTML::Tidy. It turns out the conversion produces a flat text file in PDF format. I lose all the formatting from the original Word document. It appears the only solution is to convert it through OpenOffice or Word which is not something that comes installed by the webhost.

    Even if I could install OpenOffice locally, I imagine it would take up more of my alloted space than I can afford.

    I was hoping that like most things, there would be several solutions to this problem. It seemed like a very common thing that many people would need to accomplish in a CLI mode.

    My next attempt will be to find a way to convert a word document to postscript and then use ps2pdf to convert it to a PDF thereby hoping to maintain the formatting.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://912614]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2021-10-18 06:47 GMT
Find Nodes?
    Voting Booth?
    My first memorable Perl project was:

    Results (72 votes). Check out past polls.