• Cómo extraer dos páginas de un PDF y comprobar si el texto sigue siendo seleccionable

    Para enviar dos páginas de un expediente, se puede guardar un PDF aparte con esas hojas. Merece la pena comprobar qué se puede buscar dentro del archivo: una página exportada desde un procesador de textos suele permitir seleccionar palabras, mientras que una hoja escaneada puede contener únicamente una imagen. Las dos se pueden abrir y leer, pero el buscador del visor distingue entre ellas.

    Guarda las hojas que necesita la otra persona

    Abre 更多...

  • How to make a two-page review PDF from a mixed-orientation report

    A reviewer may need a budget spread and a floor plan without the whole report. Saving those pages in a review copy keeps the original intact and gives the reviewer a smaller PDF with the same page layouts. A wide page can be stored as a wide rectangle or as a tall rectangle with a rotation setting. The two pages can look equally wide in a viewer even when the PDF stores them differently.

    Build the review copy

    Open 更多...

  • Cómo extraer la última página de un PDF y detectar un final en blanco

    Si cada acta termina con una hoja de cierre, puedes guardar esa hoja en un PDF de una sola página y nombrarla como el original. Esto ahorra abrir 更多...

  • Comparing PDF compression on searchable text and scanned pages

    A three-page PDF made of selectable text and a PDF made from scanned pages can react very differently to the same compression setting. If you are trying to meet an attachment limit, keep the original and compare the output size and what you can actually read or select.

    Results with two generated PDFs

    I tested a 3,248-byte text PDF and a 3,782,988-byte PDF made from two noisy grayscale JPEGs, using synthetic data. The table shows output sizes in bytes.

    Tool Searchable text PDF JPEG-based PDF
    PDF Fan 2,040 830,008
    iLovePDF 2,549 415,758
    Ghostscript 10.05.0 4,055 3,027,988
    qpdf 12.0.0 2,035 3,782,237

    I used the recommended setting for both browser tools, the /ebook preset for Ghostscript, and Flate recompression with object streams for qpdf. I work on the PDF Fan toolkit, one of the tools in the table.

    In this test, qpdf cut about 37% from the text PDF and about 0.02% from the JPEG-based file. The qpdf command focused on PDF objects and Flate streams and left the JPEG streams as they were. Ghostscript’s ebook preset shrank the JPEG-based file by around 20% and made the small text PDF larger. The two browser presets also produced smaller JPEG-based files. The byte counts describe these inputs and presets. Your scan’s resolution, compression and small-print legibility can change the result.

    Repeat the test on your machine

    Save the Python below as make_compression_samples.py. Run it with Pillow 13.0.0 and ReportLab 4.4.9. It creates both inputs without personal documents. JPEG encoder versions can affect the starting size.

    Show the Python script

    """Generate two synthetic PDFs for a reproducible compression comparison."""
    
    import argparse
    import io
    import random
    from pathlib import Path
    
    from PIL import Image, ImageDraw
    from reportlab.lib.utils import ImageReader
    from reportlab.pdfgen import canvas
    
    
    def text_sample(path: Path) -> None:
        pdf = canvas.Canvas(str(path), pagesize=(612, 792), invariant=True)
        for page in range(1,

    更多...

  • Cómo extraer las caras útiles de un PDF escaneado a doble cara

    Un escáner en modo dúplex puede generar un PDF de seis páginas a partir de tres hojas impresas por una sola cara. Si cada anverso va seguido de un reverso en blanco, el contenido queda en las posiciones 更多...

  • Como inserir uma página em branco para imprimir um PDF frente e verso

    Você vai imprimir uma apostila frente e verso e quer que o segundo módulo comece na frente de uma folha. Na prévia, ele começa na página 4 do PDF. Com uma página por lado e a impressão começando na primeira página do arquivo, a página 4 cai no verso da segunda folha. Uma página em branco entre os módulos resolve esse caso.

    Confira a posição do módulo no arquivo

    Conte as miniaturas desde a primeira página do PDF. Inclua a 更多...

  • How to extract PDF pages when the printed numbers are different

    Someone asks for pages 1–3 of a report, but opening the PDF takes you to a cover. The next page is the contents. In this file, the page with a printed 1 in its footer is the third PDF page. If you extract PDF pages 1–3, you send the cover, the contents, and only the first 更多...

  • Cómo comprobar los metadatos de un PDF antes de compartirlo

    Antes de enviar una copia de un PDF a un cliente o de publicarla, revisa qué aparece en las propiedades del archivo. Un borrador de prueba con una sola página incluía un autor, un asunto y una etiqueta interna que no se veían al abrirlo. También 更多...