11-29-2023, 11:15 AM | #1 |
Junior Member
Posts: 3
Karma: 10
Join Date: Nov 2023
Device: Kindle scribe
|
Getting segmentation fault with k2pdfopt
I am trying to convert this pdf (https://arxiv.org/pdf/2311.13231.pdf) to scribe format.
This is the env variable (default set) I set --> Code:
-w 1860 -h 2480 -dpi 400 -idpi -2 -om 0.2,0.15,0.2,0.15 -wrap- -col 1 Code:
-m 1 So far so good. I am trying to increase the font size. I tried all of the following options.
All of these are giving segmentation fault in page 8. I even reinstalled k2pdfopt and tried again. The error persists. The page 8 is not a blank page also. Can someone help please. |
12-09-2023, 01:34 PM | #2 |
Fuzzball, the purple cat
Posts: 1,283
Karma: 11087488
Join Date: Jun 2011
Location: California
Device: iPad
|
I believe you are fighting against the size of your reading device. You're telling k2pdfopt you don't want to re-flow the text (-wrap-) yet the document has to fit the width of your device, so that limits how large the font can be. To make it larger you'll have to allow re-flow, or maybe turn the document 90 degrees and read it in landscape? (-ls)
Did you add the bottom options to your full command line at the top to get the segfault? Also, what platform are you running on and which version of k2pdfopt are you running? (I was not able to reproduce the segfault on my Mac mini (M1 CPU) w/latest OS and k2pdfopt v2.54 using this command: k2pdfopt -w 1860 -h 2480 -dpi 400 -idpi -2 -om 0.2,0.15,0.2,0.15 -wrap- -col 1 -m 1 -fs 15 -ui- -x source.pdf) Last edited by willus; 12-09-2023 at 01:39 PM. |
Advert | |
|
02-27-2024, 02:56 AM | #3 |
Junior Member
Posts: 3
Karma: 10
Join Date: Feb 2024
Device: none
|
Getting segmentation fault with k2pdfopt
I'd be glad to help you convert the PDF to Scribe format with increased font size while avoiding segmentation faults. Here are some consolidated approaches incorporating insights from the provided responses and addressing potential issues:
1. Adjust -dpi and -mag: Start by slightly increasing the -dpi value (e.g., from 400 to 450) to provide more information for Scribe to work with. Combine this with a lower -mag value (e.g., 1.1) to scale down the image slightly, potentially mitigating segmentation faults. Command: Bash k2pdfopt -w 1860 -h 2480 -dpi 450 -idpi -2 -om 0.2,0.15,0.2,0.15 -wrap- -col 1 -mag 1.1 <input.pdf> <output.scrib> 2. Explore -fs or font configuration: If the previous approach doesn't work, experiment with the -fs option cautiously, starting with a small increment (e.g., -fs 11). Be mindful that excessive values might worsen the issue. Alternatively, consider directly configuring the font size within Scribe using the \fontsize command after conversion: Code snippet \fontsize{12pt}{14pt}\selectfont % Adjust font size and line spacing as needed 3. Handle complex layouts (if applicable): If the PDF has intricate layouts or embedded elements, Scribe's conversion might be less accurate. In such cases, consider using alternative tools like pdftotext or specialized optical character recognition (OCR) software for better text extraction, followed by manual formatting in Scribe. Additional tips: Test progressively: Make small adjustments and test the output after each modification to identify the root cause of the segmentation fault. Check for corrupted pages: If the issue persists solely on page 8, the PDF itself might be corrupt. Try extracting text from that page using online tools or alternative software to see if the problem persists. Consider alternative tools: If these approaches don't resolve the issue, explore other PDF-to-Scribe converters or tools that might handle the specific PDF structure better. Remember to replace <input.pdf> with the actual path to your PDF file and <output.scrib> with your desired output filename. I hope these consolidated suggestions help you successfully convert the PDF to Scribe format with increased font size! |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
segmentation fault just with a tap | tartanpion | KOReader | 6 | 05-28-2022 10:38 AM |
k2pdfopt segmentation fault | mike.foster | 3 | 11-23-2015 11:39 PM | |
Segmentation Fault | bowsprit | Calibre | 4 | 12-28-2010 05:13 AM |
Segmentation Fault after Qt upgrade | reader42 | Calibre | 8 | 03-21-2010 07:58 PM |
Segmentation fault | weedfreak | Calibre | 10 | 10-01-2009 03:47 PM |