| <<<Back 1 day (to 2019/08/25) | Fwd 1 day (to 2019/08/27) >>> | 20190826 |
rnissl | Hello kens, will there soon be a rc2 of GhostScript 9.28? | 10:47.28 |
kens | rnissl: I'm afraid the build maintainer is on vacation today, so I cannot be certain. | 10:48.10 |
| However, I think the answer is probably 'yes' | 10:48.18 |
| There have been some changes, and there are more we know will be needed | 10:48.28 |
rnissl | rc1 doesn't work for me and reading the mailing list, it looks like the issue may already have been fixed | 10:49.05 |
kens | Its possible, what's the problem you see ? | 10:49.18 |
rnissl | I specify an additional library directory on command line with -I..\lib | 10:50.04 |
kens | Is this on Windows ? | 10:50.13 |
rnissl | yes | 10:50.21 |
kens | There is *a* fix there. | 10:50.37 |
rnissl | and my issue is, that is won't find the file given on the commandline: -f tricks.ps | 10:51.11 |
| is there something like a nightly build available? | 10:51.39 |
kens | No, we don't do any builds except releases. | 10:51.55 |
rnissl | ok, then I'll wait for rc2 | 10:52.12 |
kens | You can build GS fro Windows pretty easily with Microsoft Visual Studio, the ommunity edition is a free (if rather large) download | 10:52.27 |
| Community edition that is | 10:52.39 |
rnissl | Well, I habe VS2017 and VS2019 Enterprise installed on my machine, so that would be no problem | 10:53.35 |
kens | I'm pretty certain there won't be another RC for over a week, at the earliest. The developer working on one of the regressions is on vacation until next Tuesday | 10:53.37 |
| If you have them installed you can build from source, there's a VS 2005 Solution in the source. | 10:53.58 |
| Just open it, let VS update it and then build | 10:54.07 |
| If you want to try it out | 10:54.17 |
rnissl | ok, I'll give it a try | 10:54.24 |
kens | Shout if you have any trouble, I'm using WIndows today | 10:54.35 |
rnissl | ok, thanks for your support so far. Bye. | 10:55.39 |
kens | Good Luck! | 10:55.50 |
| icee sorry for the delay, best time to catch people here is UK office hours. I do see your problem, I'm going to have to look into it | 10:57.50 |
rnissl | Hi kens, just wanted to let you know, that my master build worked -- will test further. Bye. | 12:16.08 |
kens | Good News! Thanksfor letting us know | 12:16.20 |
| icee Your problem is that your PDF file has not only /MediaBox, but also /CropBox, /ArtBox, /BleedBox and /TrimpBox, and all are set to the same value as the /MediaBox. When you change the media size on the command line, that only modifies the MediaBox. For the pdfwrite device *only*, the other Box values are copied through to the final PDF. If you render that PDF with GS, then you will see the expected size. | 12:24.34 |
| Acrobat, however, will use the CropBox to reduce the displayed portion to the boundaies of the CropBox. | 12:25.00 |
| So it appears that GS has not altered the Media size, when in fact it has. | 12:25.15 |
| Of coruse, if the MediaBox is *smaller* than the CropBox, then Acrobat uses that instead, so it looks like the Media size change is now working. | 12:25.41 |
| There's no easy way not to pass the other Box values to the output PDF file. However, you can (tediously) override them. It may be enough for your purposes to override teh CropBox, leaving the ArtBox, BleedBox and TrimBox alone. You can do this by adding this line to your setpagedevice invocation: | 12:28.21 |
| "/EndPage {exch pop 0 eq {[/CropBox [0 0 652 792] /PAGE pdfmark true}{false}ifelse}" | 12:29.44 |
| Miss off the "", I had to put them in or my IRC client though I was sending an IRC command. | 12:30.06 |
| If you need to modify the other boxes then you can just duplicate the [/CropBox [0 0 652 792] /PAGE pdfmark as many times as needed replacing CroBox with BleedBox, TrimBox and ArtBox. | 12:31.08 |
| Ah, if you have Acrobat Pro, then there's options to view and set the Boxes. For me on Acrobat X, its under the Tools tab, Print Production, Set Page Boxes. I expect if you open your original file with that, you'll be able to see how the media has increased but the CropBox remains stubbornly in the same place. | 12:35.40 |
rabesames | I posted my problem a few days ago and no one has answered, so I am posting it again. | 15:53.43 |
| I have a PDF (https://app.box.com/s/mp029psi609cze97vwiymcd660gbwb5w) that when I pass to GhostScript to convert to TIF, the TIF does not contain the Amy Furuhashi signature on page 6 | 15:53.50 |
| the GhostScript command I use is | 15:54.00 |
| 0b15ba83d7.pdf" | 15:54.00 |
| an example of the output TIF with the signature missing is at https://app.box.com/s/sozapzwt5nizj0fbtvctsv0jdkafh934 | 15:54.06 |
| Adobe Acrobat is able to display the signature fine | 15:54.11 |
| I've tried muPDF and it is able to display the signature fine | 15:54.16 |
| and passing it to mutools to output as a new PDF, and the new PDF is passed to GhostScript, GS is able to produce a TIF with the signature in it | 15:54.35 |
| I am using the latest version of GS 9.27 | 15:54.45 |
| I tried it also in 9.20 with the same results | 15:54.50 |
| I also tried it with GS 64-bit with the same results | 15:54.53 |
kens | 9.20 is old, ytou should start by tryign the curretn version, 9.27 | 15:55.10 |
| Oh sorry, misread that | 15:55.21 |
| If you ever have a problem you're better off reporting a bug than just mentioning it here, its more guaranteed to get a result. I didn't see your posting here | 15:56.16 |
| When I run that page to Ghostscript it gives me numerous warnings | 15:57.06 |
| Error: Somre elments of Mask array are out of range. Output may be incorrect. | 15:57.23 |
| I see a great deal more than the signature missing, there's a load of content not present | 15:58.22 |
| Presumably because its all using a Mask and its all invliad, it'll take time to figure out what the problem is | 15:58.43 |
| I do note that Acrobat says 'At least one signature has problems' | 15:59.04 |
| So fundamentally this is an insane PDF file the signature isn't a signature, it isn't even text. Its a\ series of Form XObjects, the first two of which draw nothing, the remaining ones draw a bunch of bitmap data. Eachof those has a /Mask array. The images are 1-bit per component, so the possible values are 0 and 1, the Mask array has values of 240 and 255. I'll have to go do some reading to see what is supposed to happen in this case. | 16:07.29 |
| And indeed if I remove the /Mask entry then Ghostscript no longer warns, and the image is rendered. | 16:12.14 |
| So basically your PDF file doesn't maek sense, Ghostscript tells you that and does its best (while warning you there may be a problem). | 16:12.38 |
| We can probabl;y make it ignore invalid Mask arrays, but you probably want to report it to whoever created teh PDF file. | 16:13.04 |
| Oh, itext, qhat a surprise | 16:13.23 |
rabesames | Thanks for the response. Why would muPDF be able to display the signature? | 16:16.50 |
kens | It depends on how you deal with an invlaid Mask | 16:17.06 |
| If you ignore it, then the result will be as expected (I believe) | 16:17.16 |
| But we know from bitter experience that Acrobaty does not always ignore invalid Mask values, sometimes it tries to fix them. | 16:17.37 |
| SO GS tries to do the same, looks like in this case it shouldn't | 16:17.47 |
rabesames | is there a command or parameter in gswin32.exe to ignore the mask? | 16:17.52 |
kens | No | 16:17.56 |
| Hmm, looks like we think its a /Indexed colour space, which it isn't | 16:19.49 |
| Ah no, we properly figure that one out | 16:20.18 |
| Yes if I chaneg GS to ignore the broken values, then it renders as expected | 16:21.01 |
rabesames | We will report the PDF problems with the source. The PDF producer is "iText", is that known to produce invalid PDFs? | 16:21.03 |
| "Yes if I chaneg GS to ignore the broken values" - ah. How is that done? | 16:21.32 |
kens | iText produces a lot of PDF files, its a major soruce. As with all software, there are bugs, and if nobody reports the bugs to the authours, then tehy don't get fixed.... | 16:21.44 |
| I've not seen this particular one before. | 16:21.50 |
| Changing GS is done by me editing some PostScript and tellign Ghostscript to use it. | 16:22.11 |
| It should not be considered a fix. | 16:22.21 |
| Its merely a different way of coping with an invalid file. | 16:22.33 |
rabesames | is that change something we can do as a workaround? | 16:22.33 |
kens | Possibly. | 16:22.49 |
rabesames | can you send me the revised ps file? | 16:23.10 |
kens | You would need to edit ghostpdl/Resource/Init/pdf_draw.ps, at line 2149 change : | 16:23.55 |
| [ exch { 1 BitsPerComponent bitshift 1 sub and } forall ] | 16:23.55 |
| To: | 16:23.55 |
| pop //null | 16:23.55 |
rabesames | Also, I was thinking of having an option in our system to have the PDF "cleaned up" by mutools before sending it to PDF. Would you recommend that as a workaround? | 16:24.08 |
kens | Then if your Ghostscript has been built with a ROM file system you will need to tell it to use the modified file by setting -I/ghostpdl/Resource/Init (changing the path to suit your m,odified file) | 16:24.29 |
rabesames | *before sending it to GhostScript | 16:24.35 |
kens | You could do that. I assume mutool clean will strip the offending /Mask | 16:24.53 |
| Just a reminder: Both GS and MuPDF are supplied under the AGPL. No accusing you of anything illegal or immoral, but just making it clear that you have to conform to the license | 16:25.45 |
| Since you mention 'your system' | 16:26.06 |
rabesames | Yes, understood. Right now we do not make any modifications and we do not distribute any portion of GS or MuPDF | 16:27.44 |
kens | If its internal yo're good, but the AGPL covers software as a service too. | 16:28.16 |
| I don't really want to run an inquisition, so its just a friendly reminder | 16:28.47 |
| Its not liek we're going to send eh Men In Black round, even if we knew where to go :-) | 16:29.20 |
rabesames | understood, and the reminder is appreciated | 16:29.45 |
| thanks! you have been very helpful | 16:29.54 |
kens | Not a problem, I'll see if this mitigatio helps, but its deliberate, so somewhere in our test corpus there are going to be other cases we've seen in the past which AR handles in some different fashion. Figuring ourt what its doing may be tricky | 16:30.40 |
icee | kens: hey, thank you, i'll try that | 18:36.32 |
| kens: it's a thing of beauty :D thank you very much | 18:40.47 |
| <<<Back 1 day (to 2019/08/25) | Forward 1 day (to 2019/08/27)>>> | |