Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

"Just think, with VLSI we can have 100 ENIACS on a chip!" -- Alan Perlis


computers / alt.comp.os.windows-10 / Re: Printing to PDF

Re: Printing to PDF

<n8todjxf4s.ln2@Telcontar.valinor>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=69603&group=alt.comp.os.windows-10#69603

  copy link   Newsgroups: alt.comp.os.windows-10
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!lilly.ping.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: robin_li...@es.invalid (Carlos E.R.)
Newsgroups: alt.comp.os.windows-10
Subject: Re: Printing to PDF
Date: Thu, 9 Mar 2023 12:41:43 +0100
Lines: 260
Message-ID: <n8todjxf4s.ln2@Telcontar.valinor>
References: <XnsAFBF93F3F54BFlonelydad58.gmail.co@85.12.62.225>
<MPG.3e70ef15daa55c3799008c@news.individual.net>
<qape0ith5mbaknkf36slg2me4hiha2ija2@4ax.com>
<9nekdjxn3o.ln2@Telcontar.valinor>
<qibf0i1r7a80nk9odiv1c76gqvriinn3nl@4ax.com>
<05pkdjxaqf.ln2@Telcontar.valinor>
<hohf0ils4ti10u35sc9eicej4mjp9i6rt5@4ax.com>
<pqQNL.1468984$iU59.865067@fx14.iad> <9b6ldjxseo.ln2@Telcontar.valinor>
<62UNL.64430$Kqu2.49498@fx01.iad> <tu9c0k$qfrq$1@dont-email.me>
<Qq3OL.1011956$8_id.1006166@fx09.iad> <bm7ndjxpe4.ln2@Telcontar.valinor>
<tuc66l$1cbic$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: individual.net ff/cNboYvMapRG+/7klmRQhkGFj+7YRihk4NpSKRTbESEgrMm8
X-Orig-Path: Telcontar.valinor!not-for-mail
Cancel-Lock: sha1:2pAG1L9r+2ITc5MHbZC+zaVGxls=
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.8.0
Content-Language: es-ES, en-CA
In-Reply-To: <tuc66l$1cbic$1@dont-email.me>
 by: Carlos E.R. - Thu, 9 Mar 2023 11:41 UTC

On 2023-03-09 09:43, Paul wrote:
> On 3/8/2023 3:27 PM, Carlos E.R. wrote:
>> On 2023-03-08 18:17, Alan Browne wrote:
>>> On 2023-03-08 02:03, Paul wrote:
>>>> On 3/7/2023 11:20 PM, Alan Browne wrote:
>>>>> On 2023-03-07 20:52, Carlos E.R. wrote:
>>>>>> On 2023-03-08 01:13, Alan Browne wrote:
>>>>>>> On 2023-03-07 18:23, Ken Blake wrote:
>>>>>>>
>>>>>>>> Since I almost never "print to pdf," I know I'm missing almost
>>>>>>>> nothing.
>>>>>>>
>>>>>>> One of the most practical ways to store and send documents
>>>>>>> electronically.
>>>>>>>
>>>>>>> -It's how I invoice - and very often how I'm invoiced.
>>>>>>> -It's how I send quotations and proposals.
>>>>>>> -It's how I prep my info for the accountant at tax time
>>>>>>> (Business and personal).
>>>>>>>
>>>>>>> etc.
>>>>>>>
>>>>>>> So, maybe that's not for you, but it's definitely for many.
>>>>>>
>>>>>> In most cases, it is best if the application has the option to
>>>>>> export or save to pdf, whereas print to PDF doesn't generate
>>>>>> optimal files.
>>>>>>
>>>>>> The difference is that when printing, you can get perfect results
>>>>>> by just generating images at the pixel resolution of the printer.
>>>>>> The application can optimize for that.
>>>>>>
>>>>>> But when saving or exporting, there is an interest on small size
>>>>>> and vector graphics and fonts.
>>>>>
>>>>> I've been reading the thread and I'm astonished at the file sizes
>>>>> reported.
>>>>> Those I generate with the in-OS Mac print to pdf are far, far, far
>>>>> smaller.
>>>>> I gen invoices on the order of 100 - 200 kB ... max! And those I
>>>>> receive from utilities and others are also sub MB (100 - 300 kB).
>>>>>
>>>>> So, not sure what is going on with other posters machines getting
>>>>> many MB files ... 9 .. 100 MB - but it's clearly bloated.
>>>>>
>>>>
>>>> Good benchmarks, require samples we can share.
>>>>
>>>> https://www.rsssf.org/tablest/tsjsl2hist.html
>>>
>>> Agreed.  So I printed that to file from Google Chrome via the Mac PDF
>>> printer and got 174KB.  Which seems nominal.
>>>
>>> https://www.dropbox.com/s/s933dlx0ep39tb7/Alan%27s-checklist.docx
>>>
>>> (Download it and print to pdf, do not print it from the Dropbox site).
>>>
>>> Is a short Word doc.
>>> 3 pages with a simple graphic, no colour.
>>>
>>> Here it PDF's to 82 KB
>>
>> Ok, trying with LibreOffice in Linux.
>>
>> Export to PDF; using jpeg compression for images at 85%, and 300DPI.
>>
>> And print to PDF.
>>
>>
>> cer@Telcontar:~/Download/Firefox_downloads> ls -lh Alan\'s-checklist*
>> -rw-r--r-- 1 cer users  77K Mar  8 21:20 Alan's-checklist (print).pdf
>> -rw-r--r-- 1 cer users 1,9M Mar  8 21:15 Alan's-checklist.docx
>> -rw-r--r-- 1 cer users 104K Mar  8 21:18 Alan's-checklist.pdf
>> cer@Telcontar:~/Download/Firefox_downloads>
>>
>>
>>
>> cer@Telcontar:~/Download/Firefox_downloads> pdfinfo Alan\'s-checklist\
>> \(print\).pdf
>> Title:           Alan's-checklist.docx
>> Creator:         LibreOffice 7.4.3.2
>> Producer:        LibreOffice 7.4.3.2
>> CreationDate:    Wed Mar  8 21:20:27 2023 CET
>> Custom Metadata: no
>> Metadata Stream: no
>> Tagged:          no
>> UserProperties:  no
>> Suspects:        no
>> Form:            none
>> JavaScript:      no
>> Pages:           3
>> Encrypted:       no
>> Page size:       612 x 792 pts (letter)
>> Page rot:        0
>> File size:       78293 bytes
>> Optimized:       no
>> PDF version:     1.4
>> cer@Telcontar:~/Download/Firefox_downloads> pdfinfo Alan\'s-checklist.pdf
>> Author:          Alan Browne
>> Creator:         Writer
>> Producer:        LibreOffice 7.4
>> CreationDate:    Wed Mar  8 21:18:52 2023 CET
>> Custom Metadata: no
>> Metadata Stream: yes
>> Tagged:          yes
>> UserProperties:  no
>> Suspects:        no
>> Form:            none
>> JavaScript:      no
>> Pages:           3
>> Encrypted:       no
>> Page size:       612 x 792 pts (letter)
>> Page rot:        0
>> File size:       105568 bytes
>> Optimized:       no
>> PDF version:     1.6
>> cer@Telcontar:~/Download/Firefox_downloads>
>>
>>
>>>
>>> cer@Telcontar:~/Download/Firefox_downloads> pdffonts
>>> Alan\'s-checklist\ \(print\).pdf name
>>> type              encoding         emb sub uni object ID
>>> ------------------------------------ -----------------
>>> ---------------- --- --- --- ---------
>>> BAAAAA+Carlito-Bold                  TrueType
>>> WinAnsi          yes yes yes     19  0
>>> CAAAAA+Carlito                       TrueType
>>> WinAnsi          yes yes yes     29  0
>>> DAAAAA+Carlito-Italic                TrueType
>>> WinAnsi          yes yes yes     24  0
>>> cer@Telcontar:~/Download/Firefox_downloads> pdffonts
>>> Alan\'s-checklist.pdf name
>>> type              encoding         emb sub uni object ID
>>> ------------------------------------ -----------------
>>> ---------------- --- --- --- ---------
>>> BAAAAA+Carlito-Bold                  TrueType
>>> WinAnsi          yes yes yes    123  0
>>> CAAAAA+Carlito                       TrueType
>>> WinAnsi          yes yes yes    133  0
>>> DAAAAA+Carlito-Italic                TrueType
>>> WinAnsi          yes yes yes    128  0
>>> cer@Telcontar:~/Download/Firefox_downloads>
>>
>>
>> I tried the export choosing 600DPI, and the size is the same as with
>> 300DPI, 104K.
>>
>>
>
> And when you do a
>
>    mutool extract Alan\'s-checklist\ \(print\).pdf
>
> how many JPEG files do you get in the extraction ?

Hum. I didn't know the tool, I am installing it now.

[...]

No jpgs.

cer@Telcontar:~/Download/Firefox_downloads/ppp> mutool extract
.../Alan\'s-checklist\ \(print\).pdf
extracting image-0010.png
extracting image-0012.png
extracting font-0017.ttf
extracting font-0022.ttf
extracting font-0027.ttf
cer@Telcontar:~/Download/Firefox_downloads/ppp> l
total 132
drwxr-xr-x 2 cer users 113 Mar 9 12:34 ./
drwxr-xr-x 28 cer users 24576 Mar 8 21:27 ../
-rw-r--r-- 1 cer users 16720 Mar 9 12:34 font-0017.ttf
-rw-r--r-- 1 cer users 6872 Mar 9 12:34 font-0022.ttf
-rw-r--r-- 1 cer users 21248 Mar 9 12:34 font-0027.ttf
-rw-r--r-- 1 cer users 48581 Mar 9 12:34 image-0010.png
-rw-r--r-- 1 cer users 1654 Mar 9 12:34 image-0012.png
cer@Telcontar:~/Download/Firefox_downloads/ppp>

>
> The source .docx  has 732x621 TIFF at 96 dpi. It will likely
> appear pixelated whether you select 300 or 600 DPI output.
> The quality setting for the image, may affect the storage needed.
>
> My LO is using Lossless compression at the moment. The
> mutool extraction for the one image, consists of two images.
>
>    Alans-checklist.pdf                 95,846 bytes
>
>    image-0010.png  732x621 at 24 bit   48,581
> bytes                          8 bit color
>    image-0013.png  732x621 at  8 bit    1,654 bytes (an "all-white"
> image)   8 bit grayscale

cer@Telcontar:~/Download/Firefox_downloads/ppp> file *
font-0017.ttf: TrueType Font data, 12 tables, 1st "cmap", 30 names,
Macintosh, Copyright (c) 2010-2013 by tyPoland Lukasz Dziedzic with
Reserved Font Name "Carlito". Licensed
font-0022.ttf: TrueType Font data, 12 tables, 1st "cmap", 30 names,
Macintosh, Copyright (c) 2010-2013 by tyPoland Lukasz Dziedzic with
Reserved Font Name "Carlito". Licensed
font-0027.ttf: TrueType Font data, 12 tables, 1st "cmap", 30 names,
Macintosh, Copyright (c) 2010-2013 by tyPoland Lukasz Dziedzic with
Reserved Font Name "Carlito". Licensed
image-0010.png: PNG image data, 732 x 621, 8-bit/color RGB, non-interlaced
image-0012.png: PNG image data, 732 x 621, 8-bit grayscale, non-interlaced
cer@Telcontar:~/Download/Firefox_downloads/ppp>

>
> And that's because the TIFF in the .docx is 32 bit
> and the software assumes 8 bits of that is annotation plane.
>
> When I switch to lossy 85% compression, the extracted image
> from the PDF appears to be larger, but who really knows
> how mutool is doing this (the images stored in a PDF don't
> typically have a file extension notion, they're streams with
> properties). At least the PDF (logically) is smaller.
>
>    Alans-checklist.pdf                 87,057 bytes      lossy 85%
>
>    image-0010.png  732x621 at 24 bit   88,903
> bytes                          8 bit color
>    image-0012.png  732x621 at  8 bit    1,654 bytes (an "all-white"
> image)   8 bit grayscale

Well, apparently my LO is not actually using JPG or lossy compression,
maybe because the DPI is low.

> The ancient Acrobat Distiller, had quality settings for 24 bit
> and 8 bit images, as separate settings. And that's because the
> compression options used for those are different (indexed color
> versus full color). A GIF image that had been used in a document,
> could be programmed to receive a different treatment than
> a 24-bit BMP image.
>
> Alan may be able to get a smaller print, just by altering the method
> used for the source image in the docx. That would save on the
> insignificant 1,654 byte
> thing being present. I've never seen an annotation plane handled this way.
> Normally, if it is empty and "white", you just toss the annotation plane
> and move on.
>
> But we're miles away from the grocery list test case at a gigabyte :-)
> There must have been some giant pictures of cabbages in there :-)

LOL :-D

Many computers would explode when trying to display, or deity forbids,
print it :-D

--
Cheers, Carlos.

SubjectRepliesAuthor
o Re: Printing to PDF

By: MajorLanGod on Mon, 6 Mar 2023

39MajorLanGod
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor