jpt13653903 / Gerber2PDF

Gerber to PDF converter
https://sourceforge.net/projects/gerber2pdf/
GNU General Public License v3.0
36 stars 11 forks source link

ZLib Error #23

Closed jpt13653903 closed 10 months ago

jpt13653903 commented 2 years ago

When using GhostScript to reduce the output PDF size, it complains: warning: ignoring zlib error: incorrect data check

The command-line used is gswin64c -q -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -dCompatibilityLevel=1.3 -dPDFSETTINGS=/screen -dEmbedAllFonts=true -dSubsetFonts=true -dColorImageDownsampleType=/Bicubic -dColorImageResolution=144 -dGrayImageDownsampleType=/Bicubic -dGrayImageResolution=144 -dMonoImageDownsampleType=/Bicubic -dMonoImageResolution=144 -sOutputFile=P2-510xxxx_xx_gs.pdf P2-510xxxx_xx.pdf

jpt13653903 commented 2 years ago

Note to self: I should probably just drop my own deflate algorithm and use the zlib library instead...

JonThe640 commented 1 year ago

Is it a long and hard work for you?

jpt13653903 commented 1 year ago

Probably not, but I don't foresee finding sufficient time any time soon.

I will keep this thread posted with comments when I do any updates though.

JonThe640 commented 1 year ago

I can't wait to try the new update to try reducing file size with ghostscript. Thanks again and Marry Christmas!!!

JonThe640 commented 1 year ago

Happy New year 2023 John-Philip and thanks for your support !!!

Jonathan

Merci / Thanks

Jonathan Thérien Sr PCB designer Kontron

JonThe640 commented 1 year ago

Hello John, any update about your project?

jpt13653903 commented 1 year ago

I really don't foresee finding sufficient time any time soon. My day job is keeping me busy -- expect months, rather than weeks.

JonThe640 commented 1 year ago

Hi John, how are you? Did you find time to work on this issue this spring? Thanks and have a nice day!

jpt13653903 commented 1 year ago

Hello, I'm doing well, thank you :-)

I don't really want to keep you on a line, so let's fix a date... My best estimate at the moment is that I'll find some time over the summer holidays (i.e. late December in South Africa). I strongly doubt anything will happen before then -- too much stuff happening in my day-job.

If you happen to have a friend who knows his way around a G++ compiler, he can replace JDeflate with a more sensible implementation with similar interface (maybe using the ZLib library instead of my own silly attempt I did back in the day as a fun exercise) and send me a pull-request...

JonThe640 commented 1 year ago

thanks for the update.

JonThe640 commented 1 year ago

Hi John, how are you? Did you find time to work on this issue this winter? Thanks and have a nice day!

jpt13653903 commented 1 year ago

Still doing well - thank you.

And no - the ETA is still late December

jpt13653903 commented 11 months ago

I've started looking into this... You can follow what I'm doing in the feature/zlib branch. My plan is to simply refactor my Deflate class to use the zlib library instead, and then we can go from there... I have not tried to reproduce your error yet.

jpt13653903 commented 11 months ago

@JonThe640 I have not tried to reproduce your issue -- I simply updated the code-base to use the industry-standard ZLib library instead of my own implementation. Please could you confirm if your issue is now resolved?

JonThe640 commented 11 months ago

Hi John, happy new year. I will try it and i will confirm if it works for me. thanks!!

JonThe640 commented 11 months ago

hi J-P, i tried at my home and when i execute the file Gerber2pdf.exe. It give me an error

Capture

jpt13653903 commented 11 months ago

Thanks for testing... I thought I statically linked it so that you don't need the DLL -- obviously not... I'll try again

jpt13653903 commented 11 months ago

Update available here

Let's hope this one works better...

JonThe640 commented 11 months ago

thanks, no error now!

jpt13653903 commented 11 months ago

Awesome news :-)

let me know when you've thoroughly tested it -- then I'll close this issue.

JonThe640 commented 10 months ago

Hi, i sent you an email about a bug when we have copper plane. Thanks!!
image

jpt13653903 commented 10 months ago

Got it -- I'll have a look over the weekend :-)

jpt13653903 commented 10 months ago

I'm going to move this to a new issue -- it's not about ZLib anymore...