Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File transfer is slow when printing from command line #4224

Open
fdjkdf opened this issue May 9, 2024 · 3 comments
Open

File transfer is slow when printing from command line #4224

fdjkdf opened this issue May 9, 2024 · 3 comments

Comments

@fdjkdf
Copy link

fdjkdf commented May 9, 2024

I use cmd commands for background silent printing, but the file transfer is really slow, it's much bigger than the original source file, sometimes it takes even half an hour to print a dozen files.
My commands are fine.(SumatraPDF-3.4.6-64.exe -print-to-default -print-settings ",,,,1x" "x.pdf”)
The source file is opened with other software and then printed at normal speed.

@GitHubRulesOK
Copy link
Collaborator

GitHubRulesOK commented May 9, 2024

Artifex GhostScript is probably the best for printing via Command Line and should be much higher quality.
SumatraPDF is based on Artifex MuPDF Viewing technology that has no print functions, so has to use Windows basic screen orientated printing.

@fdjkdf
Copy link
Author

fdjkdf commented May 9, 2024

Artifex GhostScript 可能是通过命令行打印的最佳选择,并且质量应该更高。 SumatraPDF 基于 Artifex MuPDF Viewing 技术,没有打印功能,因此必须使用 Windows 基本屏幕定向打印。

Is sumatraPDF printing based on ghost, I just used ghost to print and it's still very slow, about the same speed as suma!

@GitHubRulesOK
Copy link
Collaborator

GitHubRulesOK commented May 9, 2024

@fdjkdf
PDF printing in widows is generally slow

  1. read start of file for any early structure
    no its not there go to end of file where index is
    decompress and or decode index and note where file root starts
    darn its back near the start of file
    calculate from index where first page to print may be found and hope its not other end of file.
    no as usual its near the other end
    got it
    now index all the pages we may need to decompress
    go to first page and start decompiling
    oh dear the needed fonts are down at opposite end of file and we need to read the index as to where other objects like images are. So are we ready to print one page ?

etc etc . PDF is really the most random of all formats for printout
3 pages of text takes under 3 seconds to print from notepad.
where the initial PS design was few images and no document fonts as those were firmware in the printer so instantly usable, by sending just text control codes.

Modern PDF are about 10 times bigger than necessary, a single UTF letter can easily be needing over 10 bytes, (compared to a one byte Latin character) but then computers are 25% of 100 times faster so no real gains with modern methods. The greater the compression the longer to unpack for printing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants