| <<<Back 1 day (to 2018/01/16) | 20180117 |
kens | laertus sounds like your Ghostscript installation is, bascially, broken. Ghostscript is unable to find any fonts, in particular it can't fid the fallback font Courier (which is used when regular fonts are missing). The default build for Ghostscript has the fonts built into the executable in a ROM file system, clearly your build doesn't have that. | 07:54.53 |
| If you don't have a ROM file system, then you need to tell GS where a number of Resources are. That's obviously being done, because otherwise GS wouldn't start up | 07:55.22 |
| Normally the fonts would be in the same place, in a 'Font' folder, but it looks like the packager has opted to put them elsewhere. | 07:55.53 |
| That's not strictly a problem, but if you do that, then you obviously need to tell Ghostscript where they aere, or it doens't know how to find them. | 07:56.22 |
| That's what -sFONTPATH does, and the environment variable GS_FONTPATH is, of course, consulted when searching for fonts. | 07:56.55 |
| So in short, you should probably report this to whoever created the package for Ghostscript. | 07:57.13 |
laertus | alright, thank you | 07:58.03 |
SchleimKeim | good morning. is there a switch for ghostscript that tells it not to use unix line breaks? | 09:47.04 |
| and use windows cr lf instead? | 09:47.15 |
kens | I have no idea what you mean there | 09:47.22 |
| Ghostscript doesn't 'use' any kind of line breaks | 09:47.33 |
SchleimKeim | hm.. alright | 09:47.47 |
kens | Can you supply more context ? | 09:47.54 |
| Where are these line breaks ? | 09:48.00 |
SchleimKeim | hold on. let me check the englisch dictionary first | 09:48.14 |
| meh... | 09:48.29 |
| here's the thing | 09:48.31 |
| i have a pdf that i convert to postscript with ghostscript. then i write some comments into it (for our industrial printer) | 09:49.02 |
kens | OK... | 09:49.12 |
SchleimKeim | i write those comments using the c# streamwriter | 09:49.14 |
kens | Again, OK | 09:49.25 |
SchleimKeim | and streamwriter uses cr lf as a line feed | 09:49.28 |
| the original postscript only has lf | 09:49.39 |
kens | Doesn't matter | 09:49.44 |
SchleimKeim | erm.... | 09:49.51 |
kens | CR. LF, TAB, space etc are all white space in PostScript | 09:49.59 |
SchleimKeim | it does to my postscript viewer | 09:50.00 |
kens | Then your PostScript viewer is broken, I'd say | 09:50.15 |
SchleimKeim | but i get what you're saying. you say that it shouldn't matter | 09:50.27 |
kens | CR, CR/LF or LF are all equivalent in PostScript | 09:50.27 |
SchleimKeim | ok | 09:50.31 |
| apparently not every interpreteter knows about that :D | 09:50.50 |
kens | Then its broken, like I say :-) | 09:50.59 |
SchleimKeim | yeah | 09:51.02 |
kens | You could always use Ghostscript to view the PostScript | 09:51.10 |
SchleimKeim | i can? | 09:51.25 |
kens | Well yes | 09:51.31 |
| Its a PostScript itnerpreter after all | 09:51.38 |
| and the display device renders to the screen | 09:51.50 |
SchleimKeim | gswin32.exe | 09:51.54 |
| ? | 09:51.55 |
kens | Or gswin32c.exe | 09:52.01 |
| On Windows the display device is the default | 09:52.10 |
| So gswin32 <filename> will draw the result | 09:52.25 |
SchleimKeim | indeed | 09:52.29 |
| i never knew :D | 09:52.32 |
kens | If you want a more fully featured viewer you can use GSView | 09:52.58 |
SchleimKeim | ok | 09:53.09 |
kens | Versions up to and including 5 use Ghostscript to render the content | 09:53.14 |
SchleimKeim | but then it's not true what you're saying. ghostscript also doesn't display the file until i do a dos2unix on itz | 09:53.32 |
kens | 6 and above use Ghostscript to covnert the PostScript to PDF and then use MuPDF to render the PDF. | 09:53.33 |
| Then there's something you aren't telling me about the file :-) | 09:53.46 |
| If GS doesn't like your file then the file is broken | 09:54.07 |
| Try it before you apply your C# stuff and again afterwards | 09:54.19 |
SchleimKeim | that's what i'm doing right now | 09:54.29 |
kens | If it works before and not after then its the C# modifications | 09:54.32 |
SchleimKeim | the c# edited file can't be displayed until i do a dos2unix, which does nothing more than replace newlines | 09:54.46 |
kens | If you stick the modified file somewhere I can look at it | 09:54.47 |
SchleimKeim | tha'd get me fired i'm afraid. but thanx for the help | 09:55.07 |
kens | Note that I will be going out for a couple of hours, leaving in 20 minutes | 09:55.08 |
SchleimKeim | it's fine. no need for help. i'll just replace the newlines and be done with it | 09:55.28 |
kens | Can't you create an example that isn't sensitive ? | 09:55.30 |
SchleimKeim | no, because the postscript code is really messy because the source pdf is already messy | 09:56.12 |
| and i can't reproduce such messes | 09:56.19 |
kens | Well, then there's nothign more I can suggest | 09:56.34 |
SchleimKeim | but don't worry, i'll just write a funciton to replace the newlines then it'll work | 09:56.41 |
kens | SchleimKeim : If you do that, and your PostScript file contains any binary data (such as bitmaps) then you'll probably corrupt it | 10:04.57 |
| You may also alter stream lengths and then the PostScript will fail to operate at all | 10:05.16 |
| CR/LF conversion is a well known way to break PostScript files. | 10:05.30 |
SchleimKeim | @kens: it worked | 11:41.10 |
chrisl | SchleimKeim: as kens intimated, you'll want to be careful with this, in the general case, since PS can contain binary. It is *often* encoded as something more friendly, but isn't required to be | 11:47.23 |
SchleimKeim | chrisl: we'll see. they look ok in the preview window | 11:53.55 |
| i need to write a proper newline converter. but for now dos2unix does the job | 11:54.16 |
chrisl | Like I say, it'll often be just fine and, depending on the workflow, possibly usually/always be fine - it's just so you're aware, and prepared for if some files start throwing strange errors, you'll want to check for binary data | 11:56.20 |
SchleimKeim | yeah, thanks for the hint. i'll keep that in mind. | 11:57.03 |
DomiX | hi, is this possible to raise PageList param ? | 16:21.43 |
kens | What ? | 16:21.54 |
DomiX | I'm using gswin on windows to extract a long list in PageList and it fails with limitcheck | 16:22.34 |
| No sure about the number, aproximatly 300 ranges in PageList= | 16:23.09 |
kens | Sorry, I have no idea what you are talking about. PagesList doesn't 'extract' a list | 16:23.10 |
| s/PagesList/PageList/ | 16:24.08 |
| But if you are getting a limitcheck on PageList then you are (obviously) exceeding a PostScript limit, so not you can't 'raise' that. | 16:25.15 |
DomiX | yes, it's -sDEVICE=pdfwrite -sPageList=$range_list_all_pages | 16:25.51 |
| Do you know a workaround ? | 16:26.24 |
kens | PageList is implemented in PostScript for the PDF itnerpreter. If you are getting a limitcheck then you are exceeding a PostScript limit. so you can't 'raise' it. | 16:26.33 |
DomiX | extract page then append to pdf | 16:26.35 |
kens | Ghostscritp doesn't 'extract' or 'append' PDF files. | 16:26.55 |
| It creates new files whose content will probably ebar no relation to the original PDF file. | 16:27.14 |
| Your best bet is to simplify the arguments by collapsing ranges | 16:27.34 |
| Multiply processing the same file is likely to lead to a degradation in quality | 16:27.48 |
DomiX | it's already ranges :) | 16:27.49 |
kens | Start with a less complicated file then | 16:28.25 |
DomiX | it's work with a file of 600pages | 16:28.38 |
kens | You are exceeding a limit, there's no way around that | 16:28.43 |
| The number of pages is irrelevant, its the number of ranges I expect. | 16:29.00 |
| Offhand I can't think of what limit would be getting broken, but clearly something is | 16:29.43 |
DomiX | it depends. The pdf file is invoices, some invoices contains more than one pages. I can extract them and create a new pdf but I need a pdf with all invoice with one page in one pdf | 16:30.15 |
| that's the last part, it's not working | 16:31.48 |
kens | You are breaking an architectural limit, if you don't want that to happen then you will have to make the problem simpler in some fashion. How you do that is up to you | 16:32.45 |
| You are aware of the licence for Ghostscript ? And that the AGPL covers software as a service ? I only ask because this is sounding like you might be doing somethign like that | 16:33.32 |
DomiX | It's for specific internally task, I'm not writing software for selling | 16:35.39 |
kens | The AGPL covers software as a service as well, which can possibly include internal use, depending what you are doign with the output. Its not limited to selling the software | 16:36.14 |
DomiX | it's for printing usage, actually sorting is done manually (it takes 2hours) after printing pages | 16:37.01 |
kens | In any event, the answer to your original question is still 'no' | 16:37.16 |
DomiX | I understand :) I need to find another way in perl or something else | 16:38.26 |
ray_laptop | DomiX (for the logs): you may want to consider using mutool clean instead of Ghostscript. It is implemented in C, and PS limitations don't apply | 17:34.20 |
| DomiX (for the logs): note that mutool (a mupdf based command line app) is also AGPL, but kens mentioned that above | 17:35.45 |
| Forward 1 day (to 2018/01/18)>>> | |