Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

The following are the ends of two pdfs. The first comes from using lua to copy the the pdf file at the end of stop_run. For some reason the pdf is not complete and I'm curious as to what is missing.

/Author()/Title()/Subject()/Creator(LaTeX with hyperref package)/Producer(LuaTeX-0.70.1)/Keywords()
/CreationDate (D:20120513193853-05'00')
/ModDate (D:20120513193853-05'00')
/Trapped /False
/PTEX.Fullbanner (This is LuaTeX, Version beta-0.70.1 (MiKTeX 2.9 64-bit) (MiKTeX 2.9 64-bit) MiKTeX 2.9 64-bit)
>>
endobj
xref
0 127
0000000004 65535 f 
0000036280 00000 n 
0000036300 00000 n 
0000036320 00000 n 
0000000005 00000 f 
0000000006 00000 f 
0000000007 00000 f 
0000000008 00000 f 
0000000009 00000 f 
0000000010 00000 f 
0000000011 00000 f 
0000000012 00000 f 
0000000013 00000 f 
0000000014 00000 f 
0000000015 00000 f 
0000000016 00000 f 
0000000017 00000 f 
0000000018 00000 f 
0000000019 00000 f 
0000000000 00000 f 
0000000015 00000 n 
0000011764 00000 n 
0000099912 00000 n 
0000000061 00000 n 
0000000093 00000 n 
0000011818 00000 n 
0000099838 00000 n 
0000000141 00000 n 
0000000172 00000 n 
0000011873 00000 n 

The second pdf: (This one works)

/Author()/Title()/Subject()/Creator(LaTeX with hyperref package)/Producer(LuaTeX-0.70.1)/Keywords()
/CreationDate (D:20120513193853-05'00')
/ModDate (D:20120513193853-05'00')
/Trapped /False
/PTEX.Fullbanner (This is LuaTeX, Version beta-0.70.1 (MiKTeX 2.9 64-bit) (MiKTeX 2.9 64-bit) MiKTeX 2.9 64-bit)
>>
endobj
xref
0 127
0000000004 65535 f 
0000036280 00000 n 
0000036300 00000 n 
0000036320 00000 n 
0000000005 00000 f 
0000000006 00000 f 
0000000007 00000 f 
0000000008 00000 f 
0000000009 00000 f 
0000000010 00000 f 
0000000011 00000 f 
0000000012 00000 f 
0000000013 00000 f 
0000000014 00000 f 
0000000015 00000 f 
0000000016 00000 f 
0000000017 00000 f 
0000000018 00000 f 
0000000019 00000 f 
0000000000 00000 f 
0000000015 00000 n 
0000011764 00000 n 
0000099912 00000 n 
0000000061 00000 n 
0000000093 00000 n 
0000011818 00000 n 
0000099838 00000 n 
0000000141 00000 n 
0000000172 00000 n 
0000011873 00000 n 
0000099727 00000 n 
0000000220 00000 n 
0000000248 00000 n 
0000011928 00000 n 
0000099653 00000 n 
0000000301 00000 n 
0000000334 00000 n 
0000022956 00000 n 
0000099566 00000 n 
0000000387 00000 n 
0000000420 00000 n 
0000023010 00000 n 
0000099492 00000 n 
0000000473 00000 n 
0000000502 00000 n 
0000029023 00000 n 
0000099380 00000 n 
0000000548 00000 n 
0000000582 00000 n 
0000029078 00000 n 
0000099306 00000 n 
0000000630 00000 n 
0000000661 00000 n 
0000029134 00000 n 
0000099219 00000 n 
0000000709 00000 n 
0000000751 00000 n 
0000029189 00000 n 
0000099132 00000 n 
0000000799 00000 n 
0000000841 00000 n 
0000029245 00000 n 
0000099045 00000 n 
0000000889 00000 n 
0000000931 00000 n 
0000035898 00000 n 
0000098958 00000 n 
0000000979 00000 n 
0000001021 00000 n 
0000035953 00000 n 
0000098871 00000 n 
0000001069 00000 n 
0000001111 00000 n 
0000036009 00000 n 
0000098784 00000 n 
0000001159 00000 n 
0000001201 00000 n 
0000036065 00000 n 
0000098710 00000 n 
0000001249 00000 n 
0000001291 00000 n 
0000011540 00000 n 
0000011983 00000 n 
0000001339 00000 n 
0000011655 00000 n 
0000011710 00000 n 
0000097844 00000 n 
0000098129 00000 n 
0000097987 00000 n 
0000098553 00000 n 
0000023229 00000 n 
0000022786 00000 n 
0000012129 00000 n 
0000022901 00000 n 
0000098411 00000 n 
0000023064 00000 n 
0000023119 00000 n 
0000098271 00000 n 
0000023174 00000 n 
0000029301 00000 n 
0000028849 00000 n 
0000023399 00000 n 
0000028966 00000 n 
0000036121 00000 n 
0000035723 00000 n 
0000029447 00000 n 
0000035841 00000 n 
0000036373 00000 n 
0000036418 00000 n 
0000036575 00000 n 
0000036600 00000 n 
0000037058 00000 n 
0000037342 00000 n 
0000050232 00000 n 
0000050548 00000 n 
0000057585 00000 n 
0000057810 00000 n 
0000078817 00000 n 
0000079244 00000 n 
0000086440 00000 n 
0000086665 00000 n 
0000097580 00000 n 
0000098635 00000 n 
0000100024 00000 n 
0000100556 00000 n 
0000100594 00000 n 
0000100720 00000 n 
trailer
<< /Size 127
/Root 125 0 R
/Info 126 0 R
/ID [<A6C811DA4863FFFD68DAFA1EFD261EB1> <A6C811DA4863FFFD68DAFA1EFD261EB1>] >>
startxref
101047
%%EOF

I'm trying to understand what is not being finalized in the copy'ed pdf to try and fix it. My guess it is something going on with the hyperref package?

share|improve this question

closed as off topic by Jake, egreg, topskip, zeroth, cmhughes May 14 '12 at 13:17

Questions on TeX - LaTeX Stack Exchange are expected to relate to TeX, LaTeX or related typesetting systems within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

1  
Is there a way to post a minimal example that reproduces this failed PDF? Otherwise, we might have to pull out our crystal balls, since the the answer to your first question would be: "105 lines are missing." –  Werner May 14 '12 at 1:53
    
@werner not really, it would require a lot of library code and my production code which I don't really want to give out. I was hoping someone with some knowledge about the internals of the pdf format could recognize what those lines are. They are at the end of the pdf and that alone should be significant. The xref is also significant I imagine. Strangely enough I can open it with sumatra pdf but not acrobat(acrobat says the pdf is damaged). Unfortunately pdftk doesn't like the pdf and that's what I'm using to delete the pages in the pdf. –  Uiy May 14 '12 at 2:07
    
The lack of a trailer in the first case suggests that the run producing it died for some reason. The reason may not be obvious from the output, so this is going to be hard to answer. –  Joseph Wright May 14 '12 at 7:11
    
@JosephWright No, they are exactly from the same run. The first is from me trying to copy the pdf from a hook in "stop_run". –  Uiy May 14 '12 at 7:49
1  
As I understand it, that is covered in tex.stackexchange.com/questions/55743/…, as stop_run takes place before the PDF is finalised. –  Joseph Wright May 14 '12 at 7:52
show 1 more comment

1 Answer 1

Scroll to the end of the pdfs: The first one has no trailer.

May I suggest you get a copy of the PDF reference (it's freely available) and study that?

share|improve this answer
    
Well, not if I don't have too!!! Already have too many things to study ;/ Just want to get this thing to work(I shouldn't be having this problem in the first place... seems like it is a simple flush buffer issue which also creeps up in other areas such as win32... sometimes people forget to add fflush in the right place) –  Uiy May 14 '12 at 7:50
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.