f



using Using Ghostscript on certain PDF files fails to generate thumbnails: Error: /undefined in --get--

We have a few PDF's that we get that were generated via Illustrator.
You can confirm that by simply viewing the following files via a text
editor like Wordpad. We are using Ghostscript to generate JPG
thumbnails of PDF files. Many work fine but there are several cases
where the thumbnail generation fails. We noticed that in Acrobat 6 the
files will not open and throw an "Expected a non-negative integer."
message upon opening. Note that the "MediaBox" field has negative
numbers (seen via opening the file via a text editor), but then we
compensate for that and the thumbnail still does not generate. Also,
when you open the file in Acrobat 5.0, you get a very quick message
that "The file is being repaired" and when you try to close the file,
you get a confirmation message to save changes.

File that generated a thumbnail:
http://ld.livecache.net/F/340541/AARPFLredwave.pdf

A "bad" file that did not generate a thumbnail:
http://ld.livecache.net/F/347813/AARPtagFLbig293.pdf

A file that was fixed after just opening and saving in Acrobat 5.0 and
generated a thumbnail:
http://ld.livecache.net/F/348115/AARPtagFL293_fixed.pdf

from the log file:
ESP Ghostscript 7.05 (2003-02-05)
Copyright (C) 2002 artofcode LLC, Benicia, CA.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Error: /undefined in --get--
Operand stack:
   PageCount   --dict:1/1(L)--   Root
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--  
--nostringval--   2   %stopped_push   --nostringval--  
--nostringval--   --nostringval--   false   1   %stopped_push   1   3 
 %oparray_pop   1   3   %oparray_pop   --nostringval--  
--nostringval--   --nostringval--   --nostringval--   --nostringval-- 
 --nostringval--   --nostringval--
Dictionary stack:
   --dict:1048/1123(ro)(G)--   --dict:0/20(G)--   --dict:72/200(L)--  
--dict:72/200(L)--   --dict:97/127(ro)(G)--   --dict:229/230(ro)(G)-- 
 --dict:16/24(L)--
Current allocation mode is local

Anyone familiar with this problem or error message?
0
1/8/2004 4:57:00 PM
comp.lang.postscript 3552 articles. 0 followers. Post Follow

1 Replies
961 Views

Similar Articles

[PageSpeed] 51

Rob The QA Guy wrote:
> 
> We have a few PDF's that we get that were generated via Illustrator.
> You can confirm that by simply viewing the following files via a text
> editor like Wordpad. We are using Ghostscript to generate JPG
> thumbnails of PDF files. Many work fine but there are several cases
> where the thumbnail generation fails. We noticed that in Acrobat 6 the
> files will not open and throw an "Expected a non-negative integer."
> message upon opening. Note that the "MediaBox" field has negative
> numbers (seen via opening the file via a text editor), but then we
> compensate for that and the thumbnail still does not generate. Also,
> when you open the file in Acrobat 5.0, you get a very quick message
> that "The file is being repaired" and when you try to close the file,
> you get a confirmation message to save changes.
> 
> File that generated a thumbnail:
> http://ld.livecache.net/F/340541/AARPFLredwave.pdf
> 
> A "bad" file that did not generate a thumbnail:
> http://ld.livecache.net/F/347813/AARPtagFLbig293.pdf
> 
> A file that was fixed after just opening and saving in Acrobat 5.0 and
> generated a thumbnail:
> http://ld.livecache.net/F/348115/AARPtagFL293_fixed.pdf
> 
> from the log file:
> ESP Ghostscript 7.05 (2003-02-05)
> Copyright (C) 2002 artofcode LLC, Benicia, CA.  All rights reserved.
> This software comes with NO WARRANTY: see the file PUBLIC for details.
> Error: /undefined in --get--
> Operand stack:
>    PageCount   --dict:1/1(L)--   Root
> Execution stack:
> [...]
> 
> Anyone familiar with this problem or error message?

The error message by Acrobat 5 ("The file is being repaird") describes
the fact
that the xref table is not correct. Acrobat is - to a certain extent -
able to 
repair an erroneous xref table by re-creating this table. Ghostscript
makes no
attempt to do such repairs, and the error messages heavily depends on
the nature
of the error. In you case, gs has not been able to find the Root
dictionary which - amongst
others - contains the number of pages of the PDF file.

Helge


-- 
H.Blischke@srz-berlin.de
H.Blischke@srz-berlin.com
H.Blischke@acm.org
0
H.Blischke1 (284)
1/9/2004 12:15:17 PM
Reply:

Similar Artilces:

Generating multiple pdf files with generated names using ods pdf.
Hi everyone. Is it possible to generate MULTIPLE, individually named (on the fly) pdf files using the ods pdf facility? For example, an input file has data for Alfred, Betty, Charles, Debra etc and I want a separate pdf file generated for each person with the file names generated on the fly. For example, I would like to generate files named as file-Alfred.pdf file-Betty.pdf file-Charles.pdf file-Debra.pdf so that the separate reports can be "distributed" individually. The "names" above are not known in advance. I know about the newfile option, but this gener...

problem converting the postscript file to pdf using ghostscript
i have a post script file which has four pagees three pages are in Potrait and the fourth is landscape when i run command this command "gswin32c -q -dLOCALFONTS -dSAFER -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dAutoRotatePages=/None -sOutputFile=c:\S100834431_GScript_6.pdf -dCompatibilityLevel=1.4 -c ..setpdfwrite -f C:\S100834431.ps" it generates a pdf file i get the first three pages correct but the fourth page which was landscape is not displayed properly pls help me ...

Error 3045 Could not use <db file path> File already in use
I'm getting the above error message at the line 'Set db = ...' in the following code (which is called from the autoexec macro before anything else happens). Dim ws as Workspace, db as DAO.Database set ws = Workspaces(0) set db = Currentdb If I remove the 'set ws = ...' line, then the message doesn't appear. But I need the ws for a transactions routine which follows in the same function. I've tried various options for 'set db = ' but with no success. I'm using similar code throughout the database without a problem. Can anyone help? --...

Using IEEE joboptions file with ghostscript to create PDF files
TeX and ghostscript gurus, IEEE has Acrobat distiller joboptions file to be used while creating PDF files to be submitted to IEEE. I have searched through google on the topic, but the hints does not work for me. The only symptom that the joboptions file is not fully used that *I* can verify is that not all the fonts are embedded. My environments are 1. System : Linux (RedHat 9) with kernel 2.4.29 2. TeX : tetex-2.0.2 3. Ghostscript: AFPL ghostscript-8.50 I have a sample latex file for a conference paper named test.tex. It uses IEEEtran.cls and it calls several eps files generated from xfig-3.2.3d(linux version) and matlab 7.0.1(windows version). I have used the font Courier only in creating the figures and plots in eps format. I will show the following commands and outputs. (I'll add > in front for my own comments) [dhk@dhkpc1 test]$ dvips -Ppdf -D7200 -t letter -o test.ps test.dvi This is dvips(k) 5.92b Copyright 2002 Radical Eye Software (www.radicaleye.com) ' TeX output 2005.02.24:0826' -> test.ps <tex.pro><alt-rule.pro><texc.pro><8r.enc><f7b6d320.enc><aae443f0.enc> <bbad153f.enc><texps.pro><special.pro>. <cmsy7.pfb><cmr8.pfb><cmr6.pfb> <cmmi8.pfb><cmsy8.pfb><cmsy10.pfb><cmr10.pfb><cmr7.pfb><cmmi10.pfb><cmr9.pfb> [1<figs/transition_perspective3.eps>] [2<figs/cpw_surface2.eps> <plots/sparameters50.eps>] [3<...

file in use, could not use
Hi. I have two databases that are both linked to the same backend table. I can't use them both at the same time, yet other users can have both functioning simultaneously on their machines. Opening them is not the problem. ..but the error message appears when I run any queries linked to the table. It works in one database, but not the other. All users are running XP sp2 with Access 2003. The error message is the same regardless if anyone is using the backend or not. I believe it is machine specific...MY machine. I haven't a clue. Any ideas? -- Message posted via http://www.accessmon...

Re: Generating multiple pdf files with generated names using ods
Hi Carl, I don't think, that this is possible in ODS, but not sure. However I think that would be a thing for a macro or CALL EXECUTE. If you need help for that, tell us. Gerhard On Mon, 25 Aug 2008 22:05:31 -0700, cschwarzstatsfuca <cschwarzstatsfuca@GMAIL.COM> wrote: >Hi everyone. > >Is it possible to generate MULTIPLE, individually named (on the fly) >pdf files using the ods pdf facility? > >For example, an input file has data for Alfred, Betty, Charles, Debra >etc and I want a separate pdf file generated for each person with the >file names generated on...

Re: Generating multiple pdf files with generated names using ods #3
Hi Carl, Gerhard is right - the solution to you problem is making a macro that generates the ODS PDF and then use "call execute" with parameters (names ect) used to generate filename ect. I use it frequently - even to send mails ect. directly to users. /Mads Example: %macro multifile(person, filename); ODS listing close; ODS pdf file=&filename; .... ODS pdf close; ODS Listing; %Mend multifile; ** Call macro for each person in blah **; data _null_; set blah; filename=comress(filename = compress('file-' || person || '.pdf'); call execute('%multifile(...

Re: Generating multiple pdf files with generated names using ods #7
On Tue, 26 Aug 2008 13:50:57 -0700, cschwarzstatsfuca <cschwarzstatsfuca@GMAIL.COM> wrote: >Thankyou everyone for your help. Indeed Call Execute does the trick. >Here is my sample code that does what I wanted. > >data blah; /* create dummy data for each reporting group */ > length person $10; > do person = "Alfred", "Betty", "Charles", "Debra"; > output; > end; > >%macro multifile(person, filename); >ods listing close; >ods pdf file="&filename"; > >data _null_; > set blah end...

Re: Generating multiple pdf files with generated names using ods #6
Have you tried scaling this solution up using a reaasonably sized data step and tested how inefficienct it is? Toby Dunn On Tue, 26 Aug 2008 13:50:57 -0700, cschwarzstatsfuca <cschwarzstatsfuca@GMAIL.COM> wrote: >Thankyou everyone for your help. Indeed Call Execute does the trick. >Here is my sample code that does what I wanted. > >data blah; /* create dummy data for each reporting group */ > length person $10; > do person = "Alfred", "Betty", "Charles", "Debra"; > output; > end; > >%macro multifile(pers...

Re: Generating multiple pdf files with generated names using ods #8
You might also want to consider using ODS Documents - create all the individual pieces using procs with BY groups, then put them back together in the right order using PROC DOCUMENT. When I last looked at this a few years ago it wasn't quite ready for prime time, but I think there have been improvements since then. On Wed, 27 Aug 2008 09:04:59 -0700, "cschwarzstatsfuca" <cschwarzstatsfuca@GMAIL.COM> said: > In response to the post by Dunn, I haven't tried scaling this to see > how fast/slow it is. In my case, I suspect it is not a problem. I have > to create something like 400 different reports all of which are two or > three pages. This occurs on a regular basis, so any time saving in not > having to manually split the files is well worth it. These > individually named files (and the names vary from run to run) are > posted on a website for downloading by each "person" as needed. [Yes, > I've suggested that rather than creating all of these reports on a > batch basis and storing them in a big directory with no structure, why > not generate them on demand based on a simple web query, but .... long > sigh .... ] > > Thanks for the tips. In the real application, there will will be > multiple records for each "person" -- I was too lazy in my test code > to actually set up multiple values and use a by statement. > > The actual application has a mixture of sas proc steps tables a...

Re: Generating multiple pdf files with generated names using ods #4
Yes - wrap the ods in a macro and loop through all the obs to output. Its not particularly quick... Try something like:- %global sourcecnt; proc sql; select count(*) into :sourcecnt from source; quit; %macro report_loop(); %global counter; %let counter = 0; %doagain:; %let counter = %eval(&counter + 1); <ods code and datastep...> %if &counter.<&payeecnt %then %goto doagain; %mend; %report_loop(); On Tue, 26 Aug 2008 09:43:35 -0400, Mads Christensen <mc@MAXBANK.DK> wrote: >Hi Carl, > >Gerhard is right - the solution to you problem is making a macro...

how to find fonts used in PDF file using Java
For an existing PDF file, how do I find out what fonts used for each page and font size. Are there any Java API I can use to find out thest style information (font, font size, line spacing, page margin ...) of a PDF file? Thanks, George Shi gshi@ekagrasoft.com gshi@ekagrasoft.com (George Shi) wrote: >For an existing PDF file, how do I find out what fonts used for each >page and font size. Are there any Java API I can use to find out thest >style information (font, font size, line spacing, page margin ...) of >a PDF file? A little background on PDF structures may help you: readi...

when to use == and when to use is
I know this question has been answered: http://stackoverflow.com/questions/6570371/when-to-use-and-when-to-use-is , but I still have doubts. Consider the following code: class A: def __init__(self, a): self._a = a #def __eq__(self, other): # return self._a != other._a obj_0 = A(0) obj_1 = A(1) obj_2 = A(2) obj = obj_1 if obj == obj_0: print(0) elif obj == obj_1: print(1) elif obj == obj_2: print(2) if obj is obj_0: print(0) elif obj is obj_1: print(1) elif obj is obj_2: print(2) Both if statements wo...

Using Ghostscript to Scale PDF Files
I need to scale PDF files by a certain percentage whilst ripping to a raster format like tiffg4 or pxl color. If I attempt to convert the PDF (841mm x 594mm) directly to the raster format it doesn't scale (or rotate or shift): ************************MyCommand.CMD********************************** -dBATCH -dNOPAUSE -dSAFER -r600 -sDEVICE=tiffg4 -sOutputFile=MyTif.tif -c "<</Policies <</PageSize 5>> >> setpagedevice " -c "<< 0.5 0.5 scale -90 rotate -2384 0 translate >> setuserparams" -f MyPDF.PDF **********************End MyCommand.CMD***************************** If I first convert the PDF to EPS using epswrite then use a simliar command file to the above to create the resultant tiffg4 file it works. *************************MyCommand1.CMD - PDF- >EPS****************************** -dBATCH -dNOPAUSE -dSAFER -r600 -sDEVICE=epswrite -sOutputFile=MyEps.EPS -f MyPDF.PDF ************************End MyCommand1.CMD************************* *************************MyCommand2.CMD - EPS- >TIFG4****************************** -dBATCH -dNOPAUSE -dSAFER -r600 -sDEVICE=tiffg4 -sOutputFile=MyEps.TIF -c "<</Policies <</PageSize 5>> >> setpagedevice " -c "<< 0.5 0.5 scale -90 rotate -2384 0 translate >> setuserparams" -f MyEps.EPS ************************End MyCommand2.CMD************************* Not too bad performance-wise for the B&W to tiffg4 but when convertin...

How to find fonts used in PDF file using Java #2
For an existing PDF file, how do I find out what fonts used for each page and font size. Are there any Java API I can use to find out thest style information (font, font size, line spacing, page margin ...) of a PDF file? Thanks, George Shi gshi@ekagrasoft.com ...

Attaching a file to a PDF using Ghostscript (or other)?
Hi all - I'm trying to accomplish something that I thought might be fairly straightforward, but to no avail so far. I'm using Ghostscript (essentially just the ps2pdf bit I believe) to stitch together 2 PDFs and some bookmarks into a single PDF. In addition, I'd like to add the original native document to the PDF as an attached file if possible. This is my current gs command: gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=output.pdf original.PDF indesign.PDF bookmark.ps Does anyone know of a switch to gs to make this work or another program to allow this to be done in an automated fashion? Running on Mac OS 10.4.5 Thanks - Dave dmacdonald@apposite.net schrieb: .... > In addition, I'd like to add the original native document to the PDF as > an attached file if possible. .... > Does anyone know of a switch to gs to make this work or another program > to allow this to be done in an automated fashion? Running on Mac OS > 10.4.5 Hello, you should try pdftk, see http://www.accesspdf.com/pdftk/ Hope this helps. Regards, Dirk -- Dipl.-Ing. Dirk Krause http://www.fh-schmalkalden.de/url.php?/page/1026/select_wert/3023 Please use the web form in the line above to establish personal contact. Do not use the e-mail address shown in the header lines, mails to this address go into the electronic trash can. Thanks. >>>>> "dmacdonald" =3D=3D dmacdonald <dmacdonald@apposite.net> writes: dmacdonald> ...

Using using
I want to plot column 2 against col. 1, but subtract a constant from col. 2. I tried, in a test script, plot 'test.dat' using 1:($2 + 1) w p pt 7 but gnuplot complains Warning: empty y range [1:1], adjusting to [0.99:1.01] although the data file contains 1 1 2 2 3 3 4 4 5 5 What am I doing wrong? I read this in the manual: plot 'file' using 1:($2+$3) "%1f,%1f,%1f" which led me to use the above. I assume the format stuff is not needed. If I am doing this wrong, how do I modify a given column to be plotted arithmetically? -- Dieter Britz Am 22.08.2013 16:24, schrieb Dieter Britz: > I want to plot column 2 against col. 1, but subtract > a constant from col. 2. I tried, in a test script, > > plot 'test.dat' using 1:($2 + 1) w p pt 7 > > but gnuplot complains > > Warning: empty y range [1:1], adjusting to [0.99:1.01] > > although the data file contains > > 1 1 > 2 2 > 3 3 > 4 4 > 5 5 > You´ve set an xrange that ends between one and two. On Thu, 22 Aug 2013 17:46:37 +0200, Karl wrote: > Am 22.08.2013 16:24, schrieb Dieter Britz: >> I want to plot column 2 against col. 1, but subtract a constant from >> col. 2. I tried, in a test script, >> >> plot 'test.dat' using 1:($2 + 1) w p pt 7 >> >> but gnuplot complains >> >> Warning: empty y range [1:1], adjus...

How to create two pdf files into one pdf file using pdflatex?
Hi, there! I use MikTeX on my PC. I have a tex file, I use pdflatex to create a pdf file. Now my problem is that I have other a pdf file, I want to put two pdf into a pdf file. Does anyone have suggestion to do this? I am like to put some tex code into my tex file, then I run pdflatex, I will create this two pdf files into one pdf file. Thanks! zyx wrote: > Hi, there! > > I use MikTeX on my PC. I have a tex file, I use pdflatex to create a > pdf file. Now my problem is that I have other a pdf file, I want to put > two pdf into a pdf file. Does anyone have suggestion to do this? I am > like to put some tex code into my tex file, then I run pdflatex, I will > create this two pdf files into one pdf file. > Thanks! use the package: pdfpages (remember to read the manual for it) it can do all sorts of nifty things with pdf files -- /daleif (remove RTFSIGNATURE from email address) LaTeX FAQ: http://www.tex.ac.uk/faq AMSMATH Intro: http://www.ams.org/tex/amslatex.html LaTeX Intro: http://people.ee.ethz.ch/~oetiker/lshort/lshort.pdf Graphics Intro: http://www.ctan.org/tex-archive/info/epslatex.pdf Superb Class: http://www.ctan.org/tex-archive/help/Catalogue/entries/memoir.html Remember to post minimal working examples. Dear Madsen; Thank you very much for your answer. It is very useful. However, I want to create a bookmark at first pdf file, I use following lists into my tex file: *****************************************...

Can I use Ghostscript to compress PDF files?
I have some PDF files with prepress resolution and I need to compress them (screen resolution would be nice) using Ghostscript. Is it possible? Thanks in advance, Carlos ...

using ghostscript to resize an existing pdf file
hello, I'm trying to resize an existing pdf file using ghostscript. My goal is to obtain an A3 sized pdf from a broadsheet one. Does anybody know if this is achievable with ghostscript and if it is which command line option I should use? Thank you in advance for your help Fausto Graniero fausto<DOT>graniero<AT>lastampa<DOT>it Try these command line options: -sPAPERSIZE=a3 -dPDFFitPage ___________________________________________________________ Fabrizio Accatino - fhtino@yahoo.com - http://www.fhtino.it ...

Re: ODS PDF Error
On Mon, 29 Aug 2005 easwara@GMAIL.COM wrote: > When I created a PDF file using ODS PDF. When given the option of Open, > I get to see the PDF file in the result window. But, without closing > the result pane, If I happen to run the code again, I get the ERROR : > File is in Use C:\gogo.pdf. > > Is there any way to oversome this error, by closing the document if it > is open OR to REPLACE the PDF - forcefully? Easwara, Shooting from the hip, but have you tried: ODS noresults ; This will force you to open the PDF with another program, such as Adobe Reader, which wil...

Adding pictures to PDF file using GhostScript
Hello, is it possible with GhostScript to add pictures into a PDF file (on fixed positions)? And if it is, how? Regards Marc Marc Muehlfeld wrote: > Hello, > > is it possible with GhostScript to add pictures into a PDF file (on > fixed positions)? And if it is, how? > > Regards > Marc Use GhostScript to convert the PDF into single page .eps files and then write a .ps file to use those as a page background and add your photos to that. Jeff Coffield ...

using ghostscript to resize an existing pdf file
hello, I'm trying to resize an existing pdf file using ghostscript. My goal is to obtain an A3 sized pdf from a broadshee one. Does anybody know if ghostscript is the right tool to do this and if it is which command line option I should use. Thank you in advance Fausto Graniero fausto<DOT>graniero<AT>lastampa<DOT>it ...

Help, error with using fmodlcc.lib(+) using additional files to be included in the link(+)
Help, error with using fmodlcc.lib I use additional files to be included in the link (Configuration of Wedit - Linker - Additional files to be included in the link OPTION STRING) : diskpath\library\fmodlcc.lib For that step compiling/linking work, but if launch application after build write this message: - Can`t find Enter Point in function FSOUND_PlaySound in library DLL fmod.dll May be who know what problems with that library usage? Thanks. An Trusouski. ->ant.rus@hotmail.com<- ...

Using mex-files to use and close data files
All, I am working with C written mex-file routines to write data files. Opening and writing works fine. My problem is when I close the data file. I have tried using the C fclose instruction but that causes an error.. The only way I have found was using the mexAtExit function mexAtExit. .................................. static void CloseStream(void) { mexPrintf("Closing file C_Output.out\n"); fclose(U_OUTPUT); } ............................ if (U_OUTPUT==NULL) { U_OUTPUT = fopen("C_Output.out", "r+"); if (U_OUTPUT == NULL) { mexErrMsgTxt("...

Web resources about - using Using Ghostscript on certain PDF files fails to generate thumbnails: Error: /undefined in --get-- - comp.lang.postscript

Ghostscript - Wikipedia, the free encyclopedia
Ghostscript is a suite of software based on an interpreter for Adobe Systems ' PostScript and Portable Document Format (PDF) page description ...

Ghostscript 9.0 supports ICC profiles
... also supports ICC colour profiles and allows third-party Colour Management Modules (CMMs) to be integrated The developers have released Ghostscript ...

Bill Casselman's course page
PostScript is an interpreted language originally intended for use in printers.It can be used for many tasks involving complicatedgraphics, and ...

GhostPCL, GhostPDF, and GhostXPS
GhostPCL is Artifex Software's implementation of the PCL-5™ and PCL-XL™ family of page description languages. For more information please see ...

FileOptimizer can compress 33 different formats
... The program is essentially a front end for a host of other tools. Present it with a PDF file, say, and behind the scenes it’ll call up Ghostscript ...

The comet is here: Icaros 1.4 has been released!
We are really excited to announce the immediate availability of the new "point release" of Icaros Desktop, the most known distribution of the ...

Coders at Work: L Peter Deutsch
A prodigy, L Peter Deutsch started programming in the late ’50s, at age 11, when his father brought home a memo about the programming of design ...

Commands tagged mate - commandlinefu.com
Great UNIX/Bash commands tagged with mate - see these and many other invaluable command-line nuggets at commandlinefu.com

Cygwin Gold Stars
Cygwin Install Cygwin Update Cygwin Search Packages Licensing Terms Cygwin/X Community Reporting Problems Mailing Lists Newsgroups Gold Stars ...

World atlas of Flickr geotaggers is maptastic
The maps are ordered by the number of pictures taken in the central cluster of each one. This is a little unfair to aggressively polycentric ...

Resources last updated: 3/14/2016 4:59:44 AM