You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Adam Shelley <as...@inlandkwbc.com> on 2003/04/11 22:50:30 UTC

[ot] pdf file format

Hello,

I wrote a program that generates pdf's and it works but when i open my pdf
with acrobat it says 'file is damaged and is being repaired, but it opens
flawlessly after that.  Is there anyone that has the tools, the knowledge
and the will to review this file?

This program is really simple and doesn't do much in terms of formatting
accept i programmed in the ability to 'fit-to-page' and put grid lines or
green bars (i use it for reports on our business system).

It'd just be nice to have this error stop.  I think it occurs because i
don't really use text encoding but i dunno.  Of course i'm using FOP now to
do prettier pdf's but I still am using this to generate huge reports
(instead of printing to fast line printers).

Attached is the example.
Anyone in the know, let me know :D

-Adam




Re: [ot] pdf file format

Posted by Clay Leeds <cl...@medata.com>.
Adam Shelley wrote:
> Is there anyone that has the tools, the knowledge
> and the will to review this file?
> -Adam

I've done a file-diff with TextPad, and am sending the results of that
to your address (offline). But the top two lines were interesting:

Compare: (<)C:\_Web_DLs\_WEB_DEV\TEST.PDF (3517 bytes)
   with: (>)C:\_Web_DLs\_WEB_DEV\TEST_fixed.pdf (3365 bytes)

That said, I don't have "the knowledge" but my guess is your problem is
related to one of thes items:

- You specify PDF-1.4 (perhaps it's really 1.1, 1.2, or 1.3?)
- In the Document Summary, The "Title" has a space at the beginning. I
noticed that for the Dublin Core Properties section (the 3rd section),
"title" and "creator" are lowercase (the other items they're uppercase),
and there's no "Producer" or "CreatDate"

TEST.PDF's Document Metadata (possibly already modified, since this info
was grabbed from within Acrobat):

<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'
 xmlns:iX='http://ns.adobe.com/iX/1.0/'>

 <rdf:Description about=''
  xmlns='http://ns.adobe.com/pdf/1.3/'
  xmlns:pdf='http://ns.adobe.com/pdf/1.3/'>
  <pdf:Title> INLAND KENWORTH PDF DOCUMENT </pdf:Title>
  <pdf:Author>  </pdf:Author>
  <pdf:Creator> PDF CONVERTOR FOR D3 </pdf:Creator>
  <pdf:Producer>  </pdf:Producer>
  <pdf:CreationDate>0-01-01T00:00:00Z</pdf:CreationDate>
 </rdf:Description>

 <rdf:Description about=''
  xmlns='http://ns.adobe.com/xap/1.0/'
  xmlns:xap='http://ns.adobe.com/xap/1.0/'>
  <xap:Title>
   <rdf:Alt>
    <rdf:li xml:lang='x-default'> INLAND KENWORTH PDF DOCUMENT </rdf:li>
   </rdf:Alt>
  </xap:Title>
  <xap:Author>  </xap:Author>
  <xap:CreateDate>0-01-01T00:00:00Z</xap:CreateDate>
 </rdf:Description>

 <rdf:Description about=''
  xmlns='http://purl.org/dc/elements/1.1/'
  xmlns:dc='http://purl.org/dc/elements/1.1/'>
  <dc:title> INLAND KENWORTH PDF DOCUMENT </dc:title>
  <dc:creator>  </dc:creator>
 </rdf:Description>

</rdf:RDF>


-- 
Clay Leeds - cleeds@medata.com
Web Developer - Medata, Inc. - http://www.medata.com
PGP Public Key: https://mail.medata.com/pgp/cleeds.asc


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: [ot] pdf file format

Posted by Jeremias Maerki <de...@greenmail.ch>.
On 14.04.2003 17:41:11 Adam Shelley wrote:
> Don't worry, i'm not using FOP to generate this file.  The program was
> written by myself.  It does not use a writer (is that a java thing?).

java.io.Writer and descendants (as opposed to java.io.OutputStream and
descendants)

> I
> downloaded ghostview and it won't even open the file.  Acrobat opens it but
> displays a 'file is being repaired' dialog box.  Its hard to analyze what's
> wrong cause if u save it in acrobat it applies a flatedecode filter on all
> of the text and changes it to linearized and adds in some rdf info.
> Ghostview complains about the xref but i don't see why because if the xref
> was messed up wouldn't adobe choke on it too?  the xref points to all the
> objects in the document.

No, Acrobat seems to be failure tolerant in that it can analyze the PDFs
structure without consulting the xref table. The xref table is only used
for speeding up analysis of a PDF. It's not really necessary. 

Acrobat repairs ('file is being repaired' dialog box) the xref table in
that it calculates the correct indexes. When you save the PDF in Acrobat
after that your PDF will be correct again and should also open in
GhostView.

You've got to fix your indexes in the xref table, I think.
> 
> Anyways, thanks for the info.
> 
> -Adam
> 
> -----Original Message-----
> From: Jeremias Maerki [mailto:dev.jeremias@greenmail.ch]
> Sent: April 11, 2003 11:02 PM
> To: fop-user@xml.apache.org
> Subject: Re: [ot] pdf file format
> 
> 
> Opening your PDF in GhostScript can reveal some additional information.
> First it says that your EOF marker is messed up. Removing two CRLFs at
> the end of the file changes the error message to a messed up xref table.
> And looking at that it is really messed up. The indexes are wrong I
> think. Do you output the PDF using a Writer? If you do, don't. :-) You
> don't use FOP's PDF library to create the PDF, do you?
> 
> 
> On 11.04.2003 22:50:30 Adam Shelley wrote:
> > I wrote a program that generates pdf's and it works but when i open my pdf
> > with acrobat it says 'file is damaged and is being repaired, but it opens
> > flawlessly after that.  Is there anyone that has the tools, the knowledge
> > and the will to review this file?
> >
> > This program is really simple and doesn't do much in terms of formatting
> > accept i programmed in the ability to 'fit-to-page' and put grid lines or
> > green bars (i use it for reports on our business system).
> >
> > It'd just be nice to have this error stop.  I think it occurs because i
> > don't really use text encoding but i dunno.  Of course i'm using FOP now
> to
> > do prettier pdf's but I still am using this to generate huge reports
> > (instead of printing to fast line printers).
> >
> > Attached is the example.
> > Anyone in the know, let me know :D


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


RE: [ot] pdf file format

Posted by Adam Shelley <as...@inlandkwbc.com>.
Don't worry, i'm not using FOP to generate this file.  The program was
written by myself.  It does not use a writer (is that a java thing?).  I
downloaded ghostview and it won't even open the file.  Acrobat opens it but
displays a 'file is being repaired' dialog box.  Its hard to analyze what's
wrong cause if u save it in acrobat it applies a flatedecode filter on all
of the text and changes it to linearized and adds in some rdf info.
Ghostview complains about the xref but i don't see why because if the xref
was messed up wouldn't adobe choke on it too?  the xref points to all the
objects in the document.

Anyways, thanks for the info.

-Adam

-----Original Message-----
From: Jeremias Maerki [mailto:dev.jeremias@greenmail.ch]
Sent: April 11, 2003 11:02 PM
To: fop-user@xml.apache.org
Subject: Re: [ot] pdf file format


Opening your PDF in GhostScript can reveal some additional information.
First it says that your EOF marker is messed up. Removing two CRLFs at
the end of the file changes the error message to a messed up xref table.
And looking at that it is really messed up. The indexes are wrong I
think. Do you output the PDF using a Writer? If you do, don't. :-) You
don't use FOP's PDF library to create the PDF, do you?


On 11.04.2003 22:50:30 Adam Shelley wrote:
> I wrote a program that generates pdf's and it works but when i open my pdf
> with acrobat it says 'file is damaged and is being repaired, but it opens
> flawlessly after that.  Is there anyone that has the tools, the knowledge
> and the will to review this file?
>
> This program is really simple and doesn't do much in terms of formatting
> accept i programmed in the ability to 'fit-to-page' and put grid lines or
> green bars (i use it for reports on our business system).
>
> It'd just be nice to have this error stop.  I think it occurs because i
> don't really use text encoding but i dunno.  Of course i'm using FOP now
to
> do prettier pdf's but I still am using this to generate huge reports
> (instead of printing to fast line printers).
>
> Attached is the example.
> Anyone in the know, let me know :D



Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: [ot] pdf file format

Posted by Jeremias Maerki <de...@greenmail.ch>.
Opening your PDF in GhostScript can reveal some additional information.
First it says that your EOF marker is messed up. Removing two CRLFs at
the end of the file changes the error message to a messed up xref table.
And looking at that it is really messed up. The indexes are wrong I
think. Do you output the PDF using a Writer? If you do, don't. :-) You
don't use FOP's PDF library to create the PDF, do you?


On 11.04.2003 22:50:30 Adam Shelley wrote:
> I wrote a program that generates pdf's and it works but when i open my pdf
> with acrobat it says 'file is damaged and is being repaired, but it opens
> flawlessly after that.  Is there anyone that has the tools, the knowledge
> and the will to review this file?
> 
> This program is really simple and doesn't do much in terms of formatting
> accept i programmed in the ability to 'fit-to-page' and put grid lines or
> green bars (i use it for reports on our business system).
> 
> It'd just be nice to have this error stop.  I think it occurs because i
> don't really use text encoding but i dunno.  Of course i'm using FOP now to
> do prettier pdf's but I still am using this to generate huge reports
> (instead of printing to fast line printers).
> 
> Attached is the example.
> Anyone in the know, let me know :D



Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org