|
|
#1 |
|
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Mar 2015
Device: none
|
Dealing with large wrapped text
Hi MR,
I am using Sigil to create an ePub. The source file is a PDF document. I converted the PDF to word so it makes copying the text to paste into my ePub file easier but the text are wrapped. The text are also wrapped when pasted into Sigil. I then converted the PDF to text, the text wrap is still present. It will take me a long time to have to unwrap paragraph after paragraph of text. Is there a way to unwrap the text in bulk, for multiple paragraph at the same time? ![]() |
|
|
|
|
|
#2 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 29,865
Karma: 212614993
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
This has been a problem with pdf conversions forever. It is a terrible source format. It is always better to use whatever the source for creating the PDF was. There are people who will share their regular expressions for unwrapping bad pdf conversions, but nothing is going to be 100% effective. Manual editing and fixing will always be required.
Sigil has nothing inherent to help in this regard. |
|
|
|
| Advert | |
|
|
|
|
#3 | |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 85,402
Karma: 154365103
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
|
|
|
|
|
#4 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 29,865
Karma: 212614993
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
This is not a Sigil topic. This is an age-old PDF conversion issue.
|
|
|
|
|
|
#5 |
|
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 32,025
Karma: 65700000
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
I have 10 saved searches.
These are ALL really templates and get touched up to match the actual class="..." Only the simple Join to lower do I ever use 'replace all' (and that is after checking what it does). For the rest, I use Find (this is what you also use to Skip without a replace) Tip 1 is always 'Reformat: Multiple lines' before using the CSS cleans it adds the optional last ; before the }. And Prettify for the ALL HTML before using. Tip 2 is to complete the basic cleans like join to lower before STEPPING thru the joins for honorific Be careful on the order you use things with Capitals and Periods Code:
Mr.</p> <p class="foo">Smith... Here is a screenshot of my normal saved 'Joins' It is not even 75% of what you will see. Those will still need hand crafting. Some of mine include support for both curly and straight quotes. For de-hyphen, I start with Calibre's Editor:Spell check (with the filter set to -) as it offers a joined version as a choice (note: not all words with - are wrong. Never just remove blindly) Sigil and Calibre are TOOLS. I use both as the ARE different on what and how. Neither is wrong or bad. They fit with the way I do stuff HTH |
|
|
|
| Advert | |
|
|
|
|
#6 |
|
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 550
Karma: 2268308
Join Date: Nov 2015
Device: none
|
It's very, very easy. It's just what HTML was made for. Your paragraphs are separated with blank lines; add there a pair of tags </p><p> and you're set.
|
|
|
|
|
|
#7 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 29,865
Karma: 212614993
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I'm fairly certain that in this instance, it is an overabundance of </p><p> tags that is the problem. Unwrapping broken paragraphs involves removing a lot of extraneous </p><p> pairs, not adding more.
|
|
|
|
|
|
#8 | |
|
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 55,315
Karma: 182532776
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
Code:
...this is a sample</p> <p>line which continues in a new paragraph... Adding a <p></p> after each </p> would do nothing to help with this problem. |
|
|
|
|
|
|
#9 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,915
Karma: 9600930
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
@Ausic
Can you post the code for the text in your screenshot. |
|
|
|
|
|
#10 |
|
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 22,882
Karma: 34252744
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
I've been doing this for 2-3 PDFs a week for several years.
All I do to the resultant EPUBs is to fix the metadata with Sigil's Metadata Edit tool. BR |
|
|
|
|
|
#11 |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 85,402
Karma: 154365103
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
I've used AI to convert some PDF to ePub. The results are actually pretty good.
|
|
|
|
|
|
#12 |
|
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,514
Karma: 21099999
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
|
|
|
|
|
|
#13 |
|
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 550
Karma: 2268308
Join Date: Nov 2015
Device: none
|
The right solution is preventing the paragraphs from taking place. Both pdftotext, pdftoxml, or LibreOffice allow for line-based production while still detecting paragraphs. Such plain text can be 'unwrapped' by any HTML viewer.
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Dealing with white text on colored background when prepping PDFs for grayscale or B&W | JawadLeLogeur | 3 | 10-29-2025 09:29 AM | |
| Dealing with very large library | Torpido | Library Management | 3 | 03-11-2016 01:49 PM |
| Large files to text | hackettt | Calibre | 2 | 01-06-2011 06:52 AM |
| Right Aligning Wrapped Text Only | ghostyjack | ePub | 7 | 11-04-2010 08:54 AM |
| wrapped text around an image | Ambar | ePub | 2 | 07-05-2010 08:55 AM |