| <<<Back 1 day (to 2020/12/06) | Fwd 1 day (to 2020/12/08) >>> | 20201207 |
velix | ray: Microsoft fixed the Problem in Office 2019! | 11:29.12 |
| It's adding the missing bboxes :D | 11:29.22 |
| Funny. Microsoft fixes a bug only in a major release. | 11:29.38 |
| So you need to pay again for the bugfix ... | 11:29.46 |
| Damnit. After manual fixing of 152 pages, I'm getting ""Operator 'g' not allowed in this current state. " :-) | 13:09.38 |
| Yipeeeeeeee... I've just reflown it as PDF/A, which rewrote the structure. | 13:15.15 |
Antonio81 | Hello everyone | 14:17.36 |
| is there a way to force all PDFs to be A4 (strict) size? | 14:18.11 |
artifexirc-bot | <KenSharp> use -dFIXEDMEDIA and -sPAPERSIZE=A4 | 14:19.32 |
Antonio81 | I have a pdf which is 215.9 x 279.4 (mm) and I want it to always be 210 x 290 (mm) | 14:20.42 |
| it is not working | 14:20.46 |
artifexirc-bot | <KenSharp> In what way not working ? | 14:20.52 |
Antonio81 | the pdf is becoming 209,5 x 271,2 | 14:21.08 |
| and Im using an automated script to print the pdfs | 14:21.21 |
| and since the printer does not recognize the size it keeps asking me to select the tray | 14:21.37 |
| but if I use a "good" pdf after ghostscript everything works | 14:22.05 |
artifexirc-bot | <KenSharp> Well I can't see any way that would happen but without seeing the input file, and knowing the command line and version of Ghostscript you are using (ideally also the OS and where you sourced Ghostscript from) I can't really comment. | 14:22.29 |
Antonio81 | well, the input file i cannot send to you :S | 14:22.52 |
| but the other stuff i can tell you | 14:22.59 |
artifexirc-bot | <KenSharp> Then its hard to see how I can help you. Perhaps you can find another file | 14:23.10 |
Antonio81 | "C:\Program Files\gs\gs9.53.3\bin\gswin64c.exe" -q -sDEVICE=pdfwrite -dDEVICEWIDTHPOINTS=594 -dDEVICEHEIGHTPOINTS=841 -sDEFAULTPAPERSIZE=a4 -dPDFFitPage -dFIXEDMEDIA -dCompatibilityLevel=1.4 -dBATCH -dNOPAUSE -o D:\TMP\out1.pdf -c "<< /BeginPage {0.985 0.985 scale 10 15 translate } >> setpagedevice" -f D:\TMP\GR_6560-2020_sentDLS_02Dez20.pdf | 14:23.14 |
| forget the device width and height | 14:23.46 |
| "C:\Program Files\gs\gs9.53.3\bin\gswin64c.exe" -q -sDEVICE=pdfwrite -sDEFAULTPAPERSIZE=a4 -dPDFFitPage -dFIXEDMEDIA -dCompatibilityLevel=1.4 -dBATCH -dNOPAUSE -o D:\TMP\out1.pdf -c "<< /BeginPage {0.985 0.985 scale 10 15 translate } >> setpagedevice" -f D:\TMP\GR_6560-2020_sentDLS_02Dez20.pdf | 14:24.06 |
artifexirc-bot | <KenSharp> Well you've set the media size twice, once with DEVICEWIDTHPOINTS and DEVICEHIGHTPOINTS and once with PAPERSIZE | 14:24.12 |
Antonio81 | this is the one im using | 14:24.13 |
| that was a test I was doing | 14:24.33 |
artifexirc-bot | <KenSharp> Oh and you've scaled the content **and** used PDFFitPage | 14:24.36 |
Antonio81 | gs is 9.53.3 | 14:24.42 |
artifexirc-bot | <KenSharp> Which is a bad idea | 14:24.43 |
Antonio81 | and os is Windows | 14:24.45 |
artifexirc-bot | <KenSharp> I would start by dropping the setpagedevice -dPDFFitPage will do that for you | 14:25.40 |
Antonio81 | "C:\Program Files\gs\gs9.53.3\bin\gswin64c.exe" -q -sDEVICE=pdfwrite -sDEFAULTPAPERSIZE=a4 -dPDFFitPage -dCompatibilityLevel=1.4 -dBATCH -dNOPAUSE -o D:\TMP\out1.pdf -f D:\TMP\GR_6560-2020_sentDLS_02Dez20.pdf | 14:25.51 |
artifexirc-bot | <KenSharp> -o includes -dBATCH and -dNOPAUSE so you don't need all of those | 14:26.02 |
| <KenSharp> OK well without seeing the input file I can't think of a good reason why that produces anything other than an A4 output file | 14:26.29 |
Antonio81 | ok | 14:34.17 |
| I've managed to create a sample pdf | 14:34.23 |
| do you want to take a look? | 14:34.33 |
artifexirc-bot | <KenSharp> Put it somewhere I can grab hold of it and I'll take a look | 14:34.37 |
| <KenSharp> Dropbox or something will do fine | 14:34.44 |
Antonio81 | mediafire, is that ok? | 14:34.48 |
artifexirc-bot | <KenSharp> Never used it.... | 14:34.58 |
| <KenSharp> Try it and we'll see | 14:35.02 |
Antonio81 | http://www.mediafire.com/file/e9x9qcsre8j4zgz/Test_PDF.pdf/file | 14:35.52 |
| can you dl it? | 14:35.56 |
| those are the original dimensions | 14:36.19 |
| and if I process it with gs the dimensions wont change to 210 x 297 | 14:36.40 |
artifexirc-bot | <KenSharp> Yes I have the file | 14:36.40 |
Antonio81 | ty | 14:36.44 |
| hum, nvm | 14:37.34 |
| with gs the dimensions are correct | 14:37.41 |
artifexirc-bot | <KenSharp> Right | 14:37.46 |
Antonio81 | it has to be something with the original pdf | 14:37.53 |
artifexirc-bot | <KenSharp> Seems likely | 14:37.59 |
Antonio81 | maybe some kind of protection | 14:38.01 |
artifexirc-bot | <KenSharp> Possibly it has a CropBox/ArtBox/BleedBox/TrimBox | 14:38.11 |
Antonio81 | thanks, ill try to figure it out | 14:38.17 |
| artifexirc-bot | 15:13.50 |
| are you there? | 15:13.55 |
artifexirc-bot | <KenSharp> the bot certainly is 🙂 | 15:14.03 |
Antonio81 | sure | 15:14.07 |
| didn't know who I was talking to :D | 15:14.15 |
| I've got the original pdf file here | 15:14.28 |
| http://www.mediafire.com/file/pwuj2h2yeh5zinm/GR_6560-2020_sentDLS_02Dez20.pdf/file | 15:14.30 |
artifexirc-bot | <KenSharp> Doesn't it echo my nick ? Its supposed to | 15:14.30 |
Antonio81 | It does | 15:14.34 |
| but I had to reload the page as chrome stopped working | 15:14.46 |
artifexirc-bot | <KenSharp> Oh, well me then 🙂 | 15:14.48 |
Antonio81 | If you want to take a look, the file is there | 15:15.00 |
| the original with the problems :D | 15:15.09 |
artifexirc-bot | <KenSharp> I've got the file | 15:15.18 |
| <KenSharp> Running the file with this command line: gswin64c -dDEVICEHEIGHTPOINTS=595 -dDEVICEWIDTHPOINTS=842 -dFIXEDMEDIA -dPDFFitPage -sDEVICE=pdfwrite -o out.pdf \temp\GR_6560-2020_sentDLS_02Dez20.pdf | 15:17.24 |
Antonio81 | yes | 15:17.42 |
artifexirc-bot | <KenSharp> produces a PDF file where the output is 8.26 by 10.69 inches, as reported by Acrobat | 15:17.49 |
| <KenSharp> The MediaBox is 0 0 842 595 but the CropBox is 36.0 0 806.0 595.0 | 15:18.47 |
| <KenSharp> So that's almost certainly your problem, whatever you are sending the file to is trying to use the CropBox | 15:19.04 |
| <KenSharp> NB there's a Rotate 90 in there which is why the media and crop boxes are apparenlty landscape | 15:19.36 |
| <KenSharp> And indeed the PDF file has an unusual layout, the Pages tree has a CoprBox and a MediaBox set at the root node, so all the pages inherit it, both are set to be Letter {612 792] | 15:21.37 |
Antonio81 | and is there any way around it? | 15:22.01 |
| and force it 8.3 by 11.7? | 15:22.15 |
artifexirc-bot | <KenSharp> Well you coule get the file generated without the CropBox | 15:22.18 |
Antonio81 | but thats f.ed up :D | 15:22.41 |
artifexirc-bot | <KenSharp> Complain to the vendor of the printer or whatever it is you are sending it to that the CropBox is the wrong thing to be using | 15:22.43 |
Antonio81 | the client sends the pdf that way | 15:22.48 |
artifexirc-bot | <KenSharp> There's nothing technically wrong iwth what the client has sent you | 15:23.01 |
| <KenSharp> The consumer you are sending the PDF file to should do a more sensible job with the CropBox | 15:23.19 |
Antonio81 | is it possible to remove the cropbox? | 15:23.19 |
artifexirc-bot | <KenSharp> Yes, but its non-trivial | 15:23.46 |
| <KenSharp> You need to send a /PAGES pdfmark to Ghostscript's pdfwrite device | 15:23.58 |
Antonio81 | damn | 15:24.44 |
artifexirc-bot | <KenSharp> Actually it looks like you can't 'remove' the CropBox that way | 15:25.25 |
| <KenSharp> You could set it to be the same as the MediaBox | 15:25.34 |
| <KenSharp> [ /CropBox [0 0 595 842] /PAGES pdfmark | 15:26.02 |
| <KenSharp> Somewhat cleverer programming could retrieve the current page widhth and height and use that | 15:26.33 |
| <KenSharp> So =c "[ /CropBox [0 0 currentpagedevice /PageSize get dup 0 get exch 1 get ] /PAGES" -f after the PDF file name **might** work | 15:29.15 |
| <KenSharp> Hmm that's supposed to be a -c | 15:29.46 |
| <KenSharp> Anyway, that's the best I can suggest. Please note the terms of the AGPL licence, since you seem to be using Ghostscritp in a commercial environment. | 15:30.35 |
| <KenSharp> Anyway, that's the best I can suggest. Please note the terms of the AGPL licence, since you seem to be using Ghostscript in a commercial environment. | 15:30.44 |
Antonio81 | how do you get those properties? | 15:36.28 |
| any special tool? | 15:36.31 |
artifexirc-bot | <KenSharp> Which proerties ? | 15:36.44 |
Antonio81 | cropbox and media size | 15:37.29 |
artifexirc-bot | <KenSharp> Oh I just read the PDF file | 15:37.37 |
Antonio81 | do you open it with notepad++? | 15:40.14 |
artifexirc-bot | <KenSharp> No Microsoft Visual Studio, but any decent editor will do | 15:40.31 |
Antonio81 | ok, thanks | 15:40.37 |
artifexirc-bot | <RayJohnston> you can also get it using pdf_info.ps | 15:40.58 |
| <KenSharp> Or MuPDF or any of a whole range of tools, but the question was how **I** did it 🙂 | 15:41.24 |
| <RayJohnston> mutool info | 15:41.36 |
velix | ray_laptop: I finally did it! 100% valid PDF/UA. syntax fine, semantic ... about fine. | 15:48.56 |
| Office 2019 is producing shockable good PDFs. | 15:49.46 |
ray_laptop | velix: awesome! | 15:50.35 |
velix | it's hard to produce PDFs for the blind... I've done my best. | 15:51.01 |
ray_laptop | velix: so you solved the image BBox issue ? | 15:51.27 |
velix | ray_laptop: No, Microsoft did it for me. Office 2010-2016: borken, 2019 (and up): fixed. | 15:51.45 |
| broken* | 15:51.51 |
| ray_laptop: my "hack" with an empty bbox also worked. | 15:52.20 |
| ray_laptop: I've triend screenreaders and they worked fine. | 15:52.31 |
ray_laptop | velix: oh, good. That's a lot simpler than digging around inside PDF's trying to fix them | 15:52.33 |
velix | ray_laptop: Nah, I did that tonight before a friend came up with Office 2019 this morning. | 15:52.51 |
| I'm pretty fine with PDF internals... | 15:52.57 |
| I'm angry about all the people who say: "you cannot edit PDF files". | 15:53.26 |
| or even "you're not allowed to edit them" :D | 15:53.36 |
ray_laptop | mupdf with the JS or Python api makes it reasonable | 15:53.45 |
| velix: well if it has digital signature, at least you can tell if someone has | 15:54.21 |
velix | ray_laptop: stop making me interested in the API - I don't have time for this now :D | 15:54.49 |
ray_laptop | ha ha | 15:54.57 |
velix | ray_laptop: That's what christmas holidays are for | 15:54.58 |
| ray_laptop: who has money for digital signatures? they're $$$ and €€€ and other currency symbols. | 15:55.25 |
| I also have started a trial of Acrobat DC 2020. My god - ow many PDF/A formats are there now? | 15:56.54 |
artifexirc-bot | <KenSharp> Depends how you count them | 15:57.23 |
ray_laptop | velix: I'm not sure what we do for testing mupdf's digital signing -- maybe we are paying for a certificate service. But apparently it is a sought after feature for mupdf | 15:57.31 |
velix | ray_laptop: No, I mean a certificate to sign PDF is expensive. | 15:57.55 |
| KenShap, 1a, 1b, 2a, 2b, 2e ... and even 3 and 4 is there. | 15:58.13 |
| okay, we I knew PDF/X4 already | 15:58.29 |
artifexirc-bot | <KenSharp> Then there's a and b versions of those | 16:03.06 |
| <KenSharp> And ua as you know | 16:03.09 |
| <KenSharp> and ZugFeRD which is another special purpose variant | 16:03.41 |
| <KenSharp> PDF/X1 to 4 | 16:03.51 |
| <KenSharp> IIRC PDF/A-4 isn't released yet, or wasn't last time I looked | 16:04.09 |
| <KenSharp> Pretty sure there are some other variants as well that I cna't remember offhand | 16:04.40 |
velix | PDF/E | 16:07.03 |
| PDF/UA | 16:07.04 |
| But you can mix PDF/UA with others. | 16:07.10 |
| I've just created PDF/UA/A2b | 16:07.28 |
| PDF/UA+A2b ? | 16:07.37 |
| PDF/U(A)2b? | 16:07.46 |
artifexirc-bot | <KenSharp> Pretty sure that u is just another state of PDF/A like a or b | 16:09.43 |
| <KenSharp> So PDF/A-1a PDF/A-1b | 16:10.04 |
| <KenSharp> PDF/A-2a, PDF?A-2b, PDF/A-2u | 16:10.20 |
| <KenSharp> PDF/A-1 can't have a u status | 16:10.31 |
| <KenSharp> IIRC the 'a' status includes Unicode information, whereas b may or may not. The u status indicates Unicode informaiton is present, so for those versions which support it, its between a and b | 16:11.59 |
| <Robin_Watts> Signing a PDF doesn't cost anything. | 16:16.36 |
velix | No, PDF/UA is Universal Accessibility. | 16:17.20 |
artifexirc-bot | <Robin_Watts> You use acrobat to generate yourself a .pfx file - doesn't cost anything. | 16:17.30 |
velix | Robbin_Watts: Sure, but you can't validate it against a service ;) | 16:17.41 |
artifexirc-bot | <Robin_Watts> You can then "self-sign" PDFs. | 16:18.01 |
velix | It's like signing websites with a self created certificate (before Let's Encrypt came). | 16:18.03 |
| KenSharp: https://en.wikipedia.org/wiki/PDF/UA#Description | 16:18.17 |
artifexirc-bot | <Robin_Watts> Right. It's enough to know that a given person signed it. | 16:18.18 |
velix | Sorry for asking, are you all on Matrix now? No more IRC? | 16:18.30 |
artifexirc-bot | <Robin_Watts> We're on Discord. | 16:18.42 |
| <RayJohnston> Matrix ? | 16:18.44 |
velix | ah okay. | 16:18.46 |
| RayJohnston: Yeah, many channels have switched to Matrix. | 16:18.56 |
artifexirc-bot | <Robin_Watts> Matrix is an alternative messaging technology. | 16:19.00 |
| <KenSharp> @velix, yes but 'u' is a category of PDF/A files, like a and b | 16:19.01 |
velix | KenSharp: I see. confusing. | 16:19.17 |
artifexirc-bot | <KenSharp> UA is, bascially, PDF/A-1a | 16:19.22 |
| <RayJohnston> velix: Robin did bots to cross link from IRC<->discord | 16:19.23 |
velix | Yeah, but I need to type your nick names all the time ;) | 16:19.42 |
artifexirc-bot | <Robin_Watts> The IRC channels are bridged to our Discord, so the IRC channels will remain supported for the forseeable future. | 16:19.49 |
velix | ray_laptop: <-- works | 16:19.53 |
| Slack has dropped IRC support. That was sad. | 16:20.08 |
artifexirc-bot | <Robin_Watts> velix: Yes. Lack of Nick completion is a pain. | 16:20.26 |
velix | Robin_Watts: I'm fine with that. Not much traffic in here. | 16:20.39 |
artifexirc-bot | <Robin_Watts> You can bridge slack and irc using matterbridge in the same way as we have done here. | 16:20.52 |
velix | Ah, I've read about matterbridge. | 16:21.14 |
| Nice to see it in action. | 16:21.23 |
ray_laptop | velix: yeah, we considered slack when discussing having something more friendly for our non-tech staff -- and ANYTHING is better that skype, IMHO | 16:21.46 |
velix | and tams. | 16:22.03 |
| teams* | 16:22.05 |
| <<<Back 1 day (to 2020/12/06) | Forward 1 day (to 2020/12/08)>>> | |