Techsurvivors

Archives => 2008 => Topic started by: jcarter on November 01, 2008, 08:36:56 PM

Title: Need to convert some PDFs to HTMLs
Post by: jcarter on November 01, 2008, 08:36:56 PM
Ive got some lesson files that I would much rather save them as HTML, I should say I prefer to read them in HTML form. Ive got the pdfs of them, but would like to convert them to html if thats possible.
Its not really necessary, but it sure would be nice.
Thanks,
Janes
Title: Need to convert some PDFs to HTMLs
Post by: Paddy on November 01, 2008, 08:57:54 PM
Adobe has an online service - you'd need to upload your PDFs for it to work though.

http://www.adobe.com/products/acrobat/acce...nlinetools.html

Or there is this:

http://www.versiontracker.com/dyn/moreinfo/macosx/31003

(I did find the open source version of it as well, but darned if I can figure out what to do with it - there are a million files, but no GUI)

I tried out the one from VersionTracker on a 6 page PDF with decidedly mixed results. It reversed the b&w in photos (so they look like negatives) and generally made a bit of a mess of the text. This was a newsletter and there were two columns on most pages.

Then I tried the Adobe converter on a much simpler, 2 page document (minutes from a meeting)...it's still grinding away after several minutes. On very simple text with no graphics. I'll let you know if it ever finishes! rolleyes.gif

Maybe PDF ain't so bad after all...
Title: Need to convert some PDFs to HTMLs
Post by: Paddy on November 01, 2008, 11:10:49 PM
Three hours later, the Adobe site online converter is still grinding away. I finally put it out of its misery. So much for that experiment! tongue.gif
Title: Need to convert some PDFs to HTMLs
Post by: jcarter on November 02, 2008, 05:37:24 AM
Thank you for the info, I guess I will stay with the PDFs.  They are actually quite readable and nice, but I am used to the html lessons.
So its just me, I will get used to the pdf ones.  I do turn a lot of html ones into PDFs to work on later, or I make a webarchive out of them. That way is so easy, just reversing it is not easy.
Jane
Title: Need to convert some PDFs to HTMLs
Post by: tacit on November 02, 2008, 05:10:10 PM
QUOTE(Paddy @ Nov 2 2008, 01:57 AM) <{POST_SNAPBACK}>
Or there is this:

http://www.versiontracker.com/dyn/moreinfo/macosx/31003

(I did find the open source version of it as well, but darned if I can figure out what to do with it - there are a million files, but no GUI)

I tried out the one from VersionTracker on a 6 page PDF with decidedly mixed results. It reversed the b&w in photos (so they look like negatives) and generally made a bit of a mess of the text. This was a newsletter and there were two columns on most pages.


The reversed colors means that the pictures in the PDF were CMYK, not RGB, and the converter doesn't understand how to handle CMYK pictures.
Title: Need to convert some PDFs to HTMLs
Post by: Paddy on November 02, 2008, 07:17:05 PM
Ah, well - it was originally an InDesign document, so that follows.
Title: Need to convert some PDFs to HTMLs
Post by: krissel on November 03, 2008, 12:37:27 AM
If you just want to convert pdfs to text and not worry about images, there is a simple app that I found on a page Paddy linked a few days ago.  It needs to be run from the Terminal but it is easy to do.

http://www.foolabs.com/xpdf/

Once downloaded and installed you open Terminal and type in

/usr/local/bin/pdftotext

Then add a space and drag the file you want to translate into the Terminal window. It will automatically add the file address to the Terminal window. Then just hit return and a text file will appear in the same folder or place where the original pdf was located. When I tried it the original file was on the desktop so that's where the text file was placed.  

It keeps most of the paragraph formatting but no images. I tested opening the resultant file in various apps and it opens fine in Pages, TextEdit and TextWrangler keeping the format. In Appleworks and Tex-Edit Plus you lose the formatting. If you want to use AW, you can open it in TextEdit, then do a Select All and drag a clipping to the desktop. That can be dragged into AW and it will retain paragraph formatting. You could then use the Select tool in Preview to copy various images or graphics from the original pdf  and paste them into an AW or Pages file.

If you use Pages, you can put all the text in and add images and graphics, then Export to html. It will create a page with images that you can open in Safari, Camino and Firefox. Probably others, too but that's all I tested. The actual location on the page of the images may or may not be exactly where you put them as you get a warning to that effect.
Title: Need to convert some PDFs to HTMLs
Post by: Mrious_be on November 03, 2008, 02:55:45 AM
Hmmmm...

If you only need the text, then why not just use the "save as text" function within PDF reader?
It's far from perfect (bullet points are not correct, and it gives "hard returns"..) but it might be good enough?

smile.gif
Title: Need to convert some PDFs to HTMLs
Post by: jcarter on November 03, 2008, 06:29:49 AM
Actually I need more than the text, the screenshots and images are a very important part of the lessons.

But "Pages", will that do it?  I dont have Pages, but if I did, would that do what we need?
Is Pages part of the Mac software package?

Jane
Title: Need to convert some PDFs to HTMLs
Post by: Paddy on November 03, 2008, 07:39:54 AM
Jane, Pages is part of iWork, along with Keynote and Numbers. And you have to buy it - it's not included in iLife or anything.
Amazon.com has it for $67.99 - free shipping. (Apple sells it for $79)

No app retains the images - Kris just said you could copy them into the resulting document and then export to HTML (with potentially variable results). And if you decide that a three or more step process is ok, using Acrobat/Reader's export to text works well too, as Marcel notes.
Title: Need to convert some PDFs to HTMLs
Post by: jcarter on November 03, 2008, 08:27:39 AM
I guess I better just be satisfyed with the PDF lessons, they are really nice, I just was used to the HTML versions.
So its not really that important.
I wouldnt need iWork, would never need Keynote or any of that nice stuff.
Its fun to learn this stuff, I would never have known about this if I hadnt asked you all.
TS is like having a Mac classroom at our fingettips.
Thanks,
Jane
Title: Need to convert some PDFs to HTMLs
Post by: Mrious_be on November 03, 2008, 10:19:13 AM
Jane,

If you have Adobe Acrobat Professional, you'll have an option in the "file" menu to export to xml or html (with or without css).
I tried it and it works... fairly good wink.gif
Don't expect a nice clean layout once you open the html file but at least you'll have the text and images in a fairly decent way.
What I noticed is that there might be problems when the pdf does not have the font used for the text nested in it, or it has problems with tables, lists, and sometimes lining up paragraphs.

So it works... but it's the professional version only.

Another thing I found is the "donationware" software PDFtoHTML which I did not tested.
Judging from the ratings it's not something I would sugest but maybe not a lot of people really need this kind of application (and therefor don't bother downloading and rating it).

For you it might just do the trick?

smile.gif
Title: Need to convert some PDFs to HTMLs
Post by: jcarter on November 03, 2008, 10:26:16 AM
I think I will just forget it, as I really dont need the html version.  Just thought I would like it better, and its so darn easy to turn any html page into a PDF that I thought it would be just as easy to do it backwards. Not so, eh?

I never bought the professional Adobe Acrobat, as I probably would never need to use it.  Same as Pages, I wouldnt really ever have a use for it much.
Thanks,
jane
Title: Need to convert some PDFs to HTMLs
Post by: Xairbusdriver on November 03, 2008, 02:24:30 PM
Don't forget, html is not a pixel based display system. At least without everything being an image! So, placing images in exactly where they might be on a paper page is very risky. Duplicating any printed material to html is risky, as far as placement goes. I doubt that any of the suggested apps would try to deal with pixel positioning via CSS. And then font matching can also affect readability, 'page' endings, word wrap/hyphenation, bucket of worms! eek2.gif Seems a lot of work. But, if you succeeded, you'd probably know more about web building than your teachers! smile.gif

I thought one could copy text directly from a PDF in almost any PDF viewer. That would 'grab' the code, if that's what you want. And the screen shots can always be open in the viewer, also. dntknw.gif
Title: Need to convert some PDFs to HTMLs
Post by: jcarter on November 03, 2008, 03:03:37 PM
Actually I just wanted the lessons, not the code.
The PDFs are fine. I was curious to see if it could be done, after I realized that it really wasnt necessary.  
Also I sure would love to learn Garage Band, if anyone knows of some good tutorials.
I did find the Video Training site and thats really good, will give me a start.
Thanks,
Jane
Title: Need to convert some PDFs to HTMLs
Post by: Mrious_be on November 03, 2008, 03:15:58 PM
QUOTE(Xairbusdriver @ Nov 3 2008, 08:24 PM) <{POST_SNAPBACK}>
I doubt that any of the suggested apps would try to deal with pixel positioning via CSS.

Yeah...
That is why I initially got excited when I was testing it.
If you think it over in theory, it could be possible that CSS is used to position it relatively correct, as long as they calculate the measurements towards the page size that is used for the PDF you are converting from.
But it didn't do to well anyway.

Might be a good idea for Adobe to work this out a little more thorough.
I bet more people are willing to use such a function, specially since PDF is becoming so mainstream.

But sorry to hear you couldn't find what you were searching for Jane.

smile.gif
Title: Need to convert some PDFs to HTMLs
Post by: Xairbusdriver on November 03, 2008, 04:20:45 PM
QUOTE
Might be a good idea for Adobe to work this out a little more thorough.
I bet more people are willing to use such a function, specially since PDF is becoming so mainstream.
I don't know if that's such a good idea. It's hard enough now to convince 'clients' that the web is a flexible window with almost infinite shapes and sizes possible. I think the sooner people stop thinking of a web page as an equal of paper, the sooner its capabilities can be spread and exploited. And I'm not talking about "Flash!" And, even if you got the images exactly where they were in the PDF, all the user has to do is change the font size and all the lines will reflow! Oops! It could be done, if one wanted to go back to tables for positioning, I guess...why not just display the PDF? dntknw.gif Even PC's can do that, can't they?
Title: Need to convert some PDFs to HTMLs
Post by: Mrious_be on November 04, 2008, 02:05:46 PM
Good point, but still CSS could solve the reflow problem with a "float" tag used.
It's just that these days you can convert anything to anything else but a decent PDF to HTML conversion doesn't seem to be working.
I'm not saying it's a must but I do think some people might benefit from this.
What it is for me though, is that when you include a function (export to HTML or XML with or without CSS) in a rather expensive professional Acrobat software... you might want to consider to have it working rather well also.
For now, you can't really use it to accurate so why bother integrating it... for now.

smile.gif
Title: Need to convert some PDFs to HTMLs
Post by: Xairbusdriver on November 04, 2008, 03:18:22 PM
QUOTE
you can't really use it to accurate so why bother integrating it
You mean software should work correctly when it's sold?! What a concept! rofl.gif Seems many companies don't always operate that way...
Title: Need to convert some PDFs to HTMLs
Post by: krissel on November 05, 2008, 02:23:46 AM
Jane, I have a feeling you are sorry you asked about the conversion... laugh.gif



Oh, and to your question about Garageband... oddly enough, our latest member, Jeff Tolbert has written two pdf 'books' about using that app. Just happened to find these links while checking him out. (yes, Jeff, sorry but we do investigate our new registrations to prevent spammers smile.gif )

Take Control of Garageband Recording

http://oreilly.com/catalog/9781933671123/

Take Control of Making Music with Garageband

http://oreilly.com/catalog/9781933671390/
Title: Need to convert some PDFs to HTMLs
Post by: Mrious_be on November 05, 2008, 06:18:21 AM
QUOTE(Xairbusdriver @ Nov 4 2008, 09:18 PM) <{POST_SNAPBACK}>
QUOTE
you can't really use it to accurate so why bother integrating it
You mean software should work correctly when it's sold?! What a concept! rofl.gif Seems many companies don't always operate that way...

Well.... I can only hope yeah wink.gif

Sorry Jane hehehe

smile.gif
Title: Need to convert some PDFs to HTMLs
Post by: jcarter on November 05, 2008, 06:20:30 AM
Actually I learned a lot, but no, I will stick with the PDF lessons. Now I am getting used to them vs. the html ones.

Garage Band, quite a fancy program!  I will have to look into this further, and perhaps get a keyboard and start having fun.
Our kids all play guitar and keyboards, so it would be nice for them to have stuff when they are visiting, we had an antique upright HUGE piano, but gave it to our other son-in-law, so that we could knock the wall down and put a glass sunroom on that SW side of the house.

I find that the Roland keyboards are great, but the Yamaha ones are too, will have to start to do some research on this as we get closer to Christmas.
Thanks for all the info,
Jane
Title: Need to convert some PDFs to HTMLs
Post by: Xairbusdriver on November 05, 2008, 04:49:52 PM
QUOTE
our latest member, Jeff Tolbert has written two pdf 'books' about using that app.
ANy friend of Adam and/or O'Reilly is a friend of TS as well as a lot of MUGs! clap.gif