Showing posts with label PDF. Show all posts
Showing posts with label PDF. Show all posts

23 February 2026

How to shrink file size of a pdf file?

sudo apt update
sudo apt install ghostscript

The Compression Command
Use the following command to compress the PDF to a "screen" quality, which is usually sufficient for viewing on monitors or emailing and will easily bring a 3MB file below 2MB:
bash
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf
  • input.pdf: Replace with your original file name.
  • output.pdf: The name of the new compressed file.
Alternative: Better Quality (eBook)
If the /screen setting makes the text look too blurry, try /ebook (150 dpi), which balances good quality with a smaller file size:
bash
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf
Other Options
  • -dPDFSETTINGS=/screen: 72 dpi, lowest quality, smallest size (best for >2MB requirement).
  • -dPDFSETTINGS=/ebook: 150 dpi, medium quality, better for reading.
  • -dPDFSETTINGS=/printer: 300 dpi, high quality, likely to keep the file over 2MB.
Note: If the PDF contains text only, the file size reduction may be limited.


20 January 2026

How to convert a PDF file into a Markdown file or HTML file?

To convert a PDF into a Markdown file using the Python-based tool called Marker on Ubuntu, you need to set up the environment, install the
marker-pdf package, and then use the command-line interface. 
Prerequisites
Before installing Marker, ensure your Ubuntu system meets the following prerequisites:
  • Python: Version 3.10 or higher is required.
  • PyTorch: Marker needs PyTorch to run, as it relies on deep learning models.
  • System Libraries: You may need additional system libraries for advanced features like OCR with ocrmypdf or tesseract. 
Step-by-Step Guide
  1. Open your terminal on Ubuntu.
  2. Install system dependencies (optional, but recommended for full functionality, including OCR):
    bash
    # Install required apt packages
    sudo apt-get update
    sudo apt-get install -y build-essential libssl-dev libffi-dev python3-dev
    # Install tesseract and ghostscript related dependencies
    sudo apt-get install -y libleptonica-dev libtesseract-dev pkg-config
    sudo apt-get install -y ocrmypdf ghostscript
    
  3. Create a virtual environment to avoid conflicts with other Python projects (recommended):
    bash
    python3 -m venv marker_env
    source marker_env/bin/activate
    
  4. Install PyTorch by following the instructions on the official PyTorch website for your specific system configuration (CPU or GPU). A typical CPU-only installation command might look like:
    bash
    pip install torch torchvision torchaudio
    
  5. Install Marker using pip. You can install the basic PDF package or the full version for other document types:
    bash
    # For PDF conversion only
    pip install marker-pdf
    
    # For full functionality (PDFs, images, etc.)
    # pip install 'marker-pdf[full]'
    
  6. Convert a PDF file to Markdown using the command line tool marker_single.

    $ marker_single /path/to/file.pdf  

    --output_format [markdown|json|html|chunks]: Specify the format for the output results.
    --output_dir PATH: Directory where output files will be saved. Defaults to the value specified in settings.OUTPUT_DIR.

    https://github.com/datalab-to/marker

31 December 2025

which ai (free of charge) can convert the all kinds of input boxes of a pdf file into fillable and clickable?

For free AI tools that turn PDF input boxes into fillable fields, try
Instafill.ai, PDFgear, or LightPDF, which use AI to automatically detect and add text, checkbox, and signature fields to static PDFs, letting you download them as interactive forms, though some free tiers might have limits. 

Top Free AI Options:
  • Instafill.ai: Uses AI to scan and map form fields (like name, date, signature) onto flat PDFs, creating interactive ones with text, checkboxes, and signature fields automatically.
  • PDFgear: Offers a free online tool to add various form fields (text boxes, checkboxes, signatures) and customize them before downloading the fillable PDF.
  • LightPDF: Provides free online tools, including AI features, to convert and edit PDFs into fillable formats. 

How They Work (General Steps):
  1. Upload: You upload your non-fillable (flat) PDF document to the tool's website.
  2. AI Analysis: The AI scans the PDF, looking for field labels (like "Name," "Email") and layout patterns (underlines, boxes).
  3. Field Insertion: It automatically places interactive fields (text boxes, checkboxes, radio buttons, signature spots) in the right places.
  4. Customize & Download: You can review and adjust the fields (size, type, required status) before downloading your new, ready-to-use fillable PDF. 

While many offer robust free tiers, always check their specific limits on pages or features, as advanced AI functions might require payment. 

04 December 2025

08 September 2025

05 June 2024

11 July 2017

It saves to a .prn file when I want to print a .pdf file

It saves to a .prn file when I want to print a .pdf file to SHARP MX-3640N printer

Solution:

Open the .pdf file you want to print.
Click File/Print.
Click Advanced. There is no tick mark against 'Print to File'.
Tick it. Click OK. Click Print. 'Print to File' popup box appears. Click 'Cancel'.

Click File/Print/Advanced again. Clear the tick against 'Print to File'. Click OK.
Click Print. It prints successfully.

26 October 2016

Texts in PDF Files not Selectable

Texts in PDF files are not selectable. How to convert them into selectable files?

Steps of Solution:

1. Open it with Adobe Reader.
2. File | Print. Select 'Adobe PDF' as printer.
3. Click Properties | Adobe PDF Settings.
4. In 'Default Settings' selection box, choose 'High Quality Print'. Click OK. Click Print.
5. In 'Paper/Quality' tab, click Advanced...
6. For 'Print quality', choose 1200dpi.
7. Enter a file name, and save it.


1. Open the saved file with Adobe Acrobat.
2. Open Tools.
3. Go to 'Action Wizard'. Under 'Actions', choose 'Make Accessible'.
4. Click 'Start'.
5. In Description popup dialogue box, you can choose whether to fill in information. Click 'OK'.
6. In Recognize Text popup box, click OK.
7. In Fillable Form popup box, you can choose to click Yes or No.
8. In Reading Language popup box, click OK.
9. In Alternative Text for Image popup box, click OK.
10. In Set Alternative Text, click 'Save & Close'.
11. In 'Accessibility Checker Options' popup box, click 'Start checking'. Go above and click 'Close'.
12. Go to top right-hand corner, click Close.
13. Save the file as another file name.
Done.

27 July 2016

How to shrink (reduce the size of) a PDF file?

How to shrink (reduce the size of) a PDF file?

Opened the large PDF file with Adobe Reader.

File | Print.

In Printer selection box, choose 'Adobe PDF'.

Click Properties.

Click 'Paper/Quality' tab.

Click 'Advanced'. Look for 'Graphic'/'Print Quality'. Change it into a smaller number pdi. 300pdi is usually OK.

OK | OK | Print.




21 December 2015

Word with Chinese Contents Can not be Converted into PDF | There is NO PDFMaker | There is NO PDF Menu

If an Office document contains both English and Chinese, then after I have removed the Chinese words in it, it will be able to be converted into PDF.

My Office is 2010 64bit. My Adobe Acrobat is X Pro (10.0.0)

The problems in the subject happen only when your Office is 2010 64bit (32bit Office does not have those problems) and your Adobe Acrobat is X (10.0.0 or older) (10.1 or newer Acrobat does not have those problems.)

Solution: Within Acrobat, click Help | Check for Updates.. After installing the updates, version of Acrobat will become 10.1.16 (on 21 December 2015) or newer.

Install a patch from here -

http://www.adobe.com/support/downloads/product.jsp?product=1&platform=Windows

After you have installed the patch, the problems in the subject will be gone.

09 September 2015

How Do You Make Text-Selectable PDF files From Photoshop?

How Do You Make Text-Selectable PDF files From Photoshop?

Do not flatten layers or merge visible layers (keep the layers separate), then you can get a text-selectable PDF file from Photoshop.

25 August 2015

When opening a PDF file, the page flashed and became blank, then closed

When opening a PDF file, the page flashed and became blank, then closed

Solution: Exit the Chinese hand-writing software.

08 December 2014

How to copy Chinese and English texts from a photo PDF file?

Adobe Acrobat
Tools | Text Recognition | In this file | Edit | Priamary OCR Language,

Choose Chinese, then English will also be OK.