Author Topic: Ghostscript: The Thread  (Read 20717 times)

0 Members and 1 Guest are viewing this topic.

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Ghostscript: The Thread
« Reply #15 on: April 17, 2008, 01:44:26 PM »
Thank You Mark!!!

Now I need a switch to print upside down, as the rotation is upside down.  I think I saw an option for that, so I'll see if I can find it again, but if you/anyone knows it off the top of your heads I'm will to accept the help.   :-)
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Ghostscript: The Thread
« Reply #16 on: April 17, 2008, 02:45:31 PM »
I have seen, in my searches, that the orientation for landscape could be 1 or 3.  I used 1 and now it is not upside down.  Thanks a lot.

Not to see if I can expand on this, and have them all put into one pdf file based on the numbers.  This might be a pipe drawing, but if it works that will be great.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Re: Ghostscript: The Thread
« Reply #17 on: April 17, 2008, 03:43:43 PM »
Not to see if I can expand on this, and have them all put into one pdf file based on the numbers.  This might be a pipe drawing, but if it works that will be great.

I use pdftk for that because I get files from multiple sources.
TheSwamp.org  (serving the CAD community since 2003)

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Re: Ghostscript: The Thread
« Reply #18 on: April 17, 2008, 03:44:08 PM »
TheSwamp.org  (serving the CAD community since 2003)

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Ghostscript: The Thread
« Reply #19 on: April 17, 2008, 05:24:07 PM »
Not to see if I can expand on this, and have them all put into one pdf file based on the numbers.  This might be a pipe drawing, but if it works that will be great.

I use pdftk for that because I get files from multiple sources.

Does this mean that it can't be done with ghostscript?  I see that if you list all the names, then it will, but I want it to find all the pdfs in the current directory and create a single pdf out of them.  I can't seem to find a way to do it without listing all the files to convert.  I don't know how to use batch files, so this is a learning experience, and I can't seem to find the correct resources.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Re: Ghostscript: The Thread
« Reply #20 on: April 17, 2008, 07:10:31 PM »
Not to see if I can expand on this, and have them all put into one pdf file based on the numbers.  This might be a pipe drawing, but if it works that will be great.

I use pdftk for that because I get files from multiple sources.

Does this mean that it can't be done with ghostscript?

I'm not saying that because I'm not sure, I just like the pdftk works. :)

http://www.theswamp.org/index.php?topic=21802.msg265987#msg265987
TheSwamp.org  (serving the CAD community since 2003)

Krushert

  • Seagull
  • Posts: 13679
  • FREE BEER Tomorrow!!
Re: Ghostscript: The Thread
« Reply #21 on: May 29, 2008, 02:35:13 PM »
Okay so I got some time to give this Ghost Script a try to what it can do.

Well I manage to get a "_.at" File with this inside
Quote
-dCompatibilityLevel#1.4
A7.1
SERIES-A7.1.plt

For my batch file, I started with Mark's version and ended up with this.
Code: [Select]
rem @echo off
rem Ted Krush
rem 05/29/2008 - testing PDFs
rem
%echo off
::
echo looking for .plt files ....
echo.
echo.
echo Converting to pdf ....
echo.
for %%f in (*.plt) do call "C:\Program Files\GhostScript\ghostscript-8.62\lib\ps2pdf" %%f ..\output\%%~nf.pdf
echo.
echo.
echo.
echo.
echo.
echo.
echo All done!



I am assuming that the at file is a log file of what went wrong.  Where did I screw up at and where do I go to figure it out.

I + XI = X is true ...  ... if you change your perspective.

I no longer CAD or Model, I just hang out here picking up the empties beer cans

JohnK

  • Administrator
  • Seagull
  • Posts: 10634
Re: Ghostscript: The Thread
« Reply #22 on: May 29, 2008, 04:45:38 PM »
Why are you calling the BAT file when you can/should get in the habit of calling the program...

Set up GS the right way; -i.e. at min. set up your environment vars, and then you can use this for all your conversion needs.

Code: [Select]
for %%f in (*.plt) do gswin32c -dSAFER -r600 -sDEVICE=pdfwrite -o "%%~nf.pdf" "%%f"
I created a VBS file instead of a BAT file, this way i can drag and drop files to that script to be converted (i dont have to convert all the files).
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

Krushert

  • Seagull
  • Posts: 13679
  • FREE BEER Tomorrow!!
Re: Ghostscript: The Thread
« Reply #23 on: May 29, 2008, 05:37:01 PM »
Why are you calling the BAT file when you can/should get in the habit of calling the program...

Set up GS the right way; -i.e. at min. set up your environment vars, and then you can use this for all your conversion needs.

Code: [Select]
for %%f in (*.plt) do gswin32c -dSAFER -r600 -sDEVICE=pdfwrite -o "%%~nf.pdf" "%%f"

I DON'T KNOW! 
The way I have it set up was the most I got of it after trial and error.  I tried similar code that you guys have posted and got nothing but the dos shell.  Mater of fact I just tried you code above and got the same results

Noticed I downloaded the latest version and no where can find the exe file and the only gswin32 files that I found found are the 4 files in the image below.

Also I see mentioin of making a make file?  But I can't

I created a VBS file instead of a BAT file, this way i can drag and drop files to that script to be converted
This is what I want.  What is the difference besides the file extensions?  How do draft it up?  After a quick search, it is a Visual Basic and I have to say I know nothing about Visual Basic

(i dont have to convert all the files).
  Huh You only have to drag and drop some of them to to convert all of them?

Again I am fish out of water and all I am doing is flopping arround and making a big mess.
« Last Edit: May 29, 2008, 05:40:03 PM by Krushert »
I + XI = X is true ...  ... if you change your perspective.

I no longer CAD or Model, I just hang out here picking up the empties beer cans

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: Ghostscript: The Thread
« Reply #24 on: May 29, 2008, 05:42:39 PM »
I would still like to see the ability to capture multiple plots and put them into a single PDF file
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

JohnK

  • Administrator
  • Seagull
  • Posts: 10634
Re: Ghostscript: The Thread
« Reply #25 on: May 29, 2008, 06:24:59 PM »
<snip>
Again I am fish out of water and all I am doing is flopping arround and making a big mess.[/i]

*lmao* Yes you are! We need to talk tomorrow. I will get you all set up. 15 minutes tops.

BTW, your looking at the source code.

Keith, That's no problem. I will show you how tomorrow.


Im going home now.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

Maverick®

  • Seagull
  • Posts: 14778
Re: Ghostscript: The Thread
« Reply #26 on: May 29, 2008, 06:37:01 PM »
Im going home now.

'Nite John boy.

JohnK

  • Administrator
  • Seagull
  • Posts: 10634
Re: Ghostscript: The Thread
« Reply #27 on: May 30, 2008, 10:28:52 AM »
I would still like to see the ability to capture multiple plots and put them into a single PDF file

This is the essence for putting several files into one.

Code: [Select]
gs -sDEVICE=pdfwrite -o output.pdf file1.ps file2.ps file3.ps
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: Ghostscript: The Thread
« Reply #28 on: May 30, 2008, 10:32:53 AM »
Cool .. now I just need to automate it in my plotting script
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Ghostscript: The Thread
« Reply #29 on: May 30, 2008, 01:21:26 PM »
Cool .. now I just need to automate it in my plotting script
Please post how you automate, as I couldn't figure it out.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.