Author Topic: Need to convert some PDFs to HTMLs  (Read 6345 times)

Offline jcarter

  • TS Addict
  • *****
  • Posts: 5808
    • View Profile
    • http://www.jcarter.net/ourdogs/muffinpage.html
Need to convert some PDFs to HTMLs
« 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

Offline Paddy

  • Administrator
  • TS Addict
  • *****
  • Posts: 13798
    • View Profile
    • https://www.paddyduncan.com
Need to convert some PDFs to HTMLs
« Reply #1 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...
"If computers get too powerful, we can organize them into committees. That'll do them in." ~Author unknown •iMac 5K, 27" 3.6Ghz i9 (2019) • 16" M1 MBP(2021) • 9.7" iPad Pro • iPhone 13

Offline Paddy

  • Administrator
  • TS Addict
  • *****
  • Posts: 13798
    • View Profile
    • https://www.paddyduncan.com
Need to convert some PDFs to HTMLs
« Reply #2 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
"If computers get too powerful, we can organize them into committees. That'll do them in." ~Author unknown •iMac 5K, 27" 3.6Ghz i9 (2019) • 16" M1 MBP(2021) • 9.7" iPad Pro • iPhone 13

Offline jcarter

  • TS Addict
  • *****
  • Posts: 5808
    • View Profile
    • http://www.jcarter.net/ourdogs/muffinpage.html
Need to convert some PDFs to HTMLs
« Reply #3 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

Offline tacit

  • TS Addict
  • *****
  • Posts: 1628
    • View Profile
    • http://www.xeromag.com/
Need to convert some PDFs to HTMLs
« Reply #4 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.
A whole lot about me: www.xeromag.com/franklin.html

Offline Paddy

  • Administrator
  • TS Addict
  • *****
  • Posts: 13798
    • View Profile
    • https://www.paddyduncan.com
Need to convert some PDFs to HTMLs
« Reply #5 on: November 02, 2008, 07:17:05 PM »
Ah, well - it was originally an InDesign document, so that follows.
"If computers get too powerful, we can organize them into committees. That'll do them in." ~Author unknown •iMac 5K, 27" 3.6Ghz i9 (2019) • 16" M1 MBP(2021) • 9.7" iPad Pro • iPhone 13

Offline krissel

  • Administrator
  • TS Addict
  • *****
  • Posts: 14766
    • View Profile
Need to convert some PDFs to HTMLs
« Reply #6 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.
« Last Edit: November 03, 2008, 12:38:34 AM by krissel »


A Techsurvivors founder

Offline Mrious_be

  • TS Addict
  • *****
  • Posts: 3156
    • View Profile
    • http://www.marceldaems.com
Need to convert some PDFs to HTMLs
« Reply #7 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
[img]http://dwdf.daisypath.com/a4ipp1.png\" border=\"0\" class=\"linked-sig-image\" /]

Offline jcarter

  • TS Addict
  • *****
  • Posts: 5808
    • View Profile
    • http://www.jcarter.net/ourdogs/muffinpage.html
Need to convert some PDFs to HTMLs
« Reply #8 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

Offline Paddy

  • Administrator
  • TS Addict
  • *****
  • Posts: 13798
    • View Profile
    • https://www.paddyduncan.com
Need to convert some PDFs to HTMLs
« Reply #9 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.
"If computers get too powerful, we can organize them into committees. That'll do them in." ~Author unknown •iMac 5K, 27" 3.6Ghz i9 (2019) • 16" M1 MBP(2021) • 9.7" iPad Pro • iPhone 13

Offline jcarter

  • TS Addict
  • *****
  • Posts: 5808
    • View Profile
    • http://www.jcarter.net/ourdogs/muffinpage.html
Need to convert some PDFs to HTMLs
« Reply #10 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

Offline Mrious_be

  • TS Addict
  • *****
  • Posts: 3156
    • View Profile
    • http://www.marceldaems.com
Need to convert some PDFs to HTMLs
« Reply #11 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
[img]http://dwdf.daisypath.com/a4ipp1.png\" border=\"0\" class=\"linked-sig-image\" /]

Offline jcarter

  • TS Addict
  • *****
  • Posts: 5808
    • View Profile
    • http://www.jcarter.net/ourdogs/muffinpage.html
Need to convert some PDFs to HTMLs
« Reply #12 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

Offline Xairbusdriver

  • Administrator
  • TS Addict
  • *****
  • Posts: 26458
  • 24" iMac (2024, M4), Golden Gate 27
    • View Profile
Need to convert some PDFs to HTMLs
« Reply #13 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
THERE ARE TWO TYPES OF COUNTRIES
Those that use metric = #1 Measurement system
And the United States = The Banana system
CAUTION! Childhood vaccinations cause adults! :yes:

Offline jcarter

  • TS Addict
  • *****
  • Posts: 5808
    • View Profile
    • http://www.jcarter.net/ourdogs/muffinpage.html
Need to convert some PDFs to HTMLs
« Reply #14 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