Re: How to open PDF that requires Adobe 9

Previous thread: pf/nat/dns setup question by ramrunner on Saturday, December 4, 2010 - 4:20 pm. (1 message)

Next thread: Apache with latest snapshot by James A. Peltier on Saturday, December 4, 2010 - 7:31 pm. (2 messages)
From: Clint Pachl
Date: Saturday, December 4, 2010 - 6:28 pm

UPS is so annoying. The UPS developer's guide is in a 9MB PDF file. When 
I open it with xpdf(1) I get a (1) page PDF that states I need to 
download the the latest Adobe crapware to view it.

How can I get around this? Why does xpdf even abide?

I tried the following gs(1) command hoping it would convert it, but 
failed with an unrecoverable error (I can paste the error output here if 
someone thinks it will be helpful):

gs -dNOPAUSE -dSAFER -dBATCH -sDEVICE=pdfwrite -sOutputFile=foo.pdf 
guide.pdf

I also tried without the options, NOPAUSE, etc.

Any suggestions?

From: Anthony J. Bentley
Date: Saturday, December 4, 2010 - 6:45 pm

This happens when there are multiple PDFs embedded in a single PDF file.
I remember reading a Ghostscript bug about this (could probably find it
again if I had the exact error message), but unfortunately Mupdf still
doesn't support it.

Standard Adobe Reader lets you view but not extract, even. I had to go
to a computer lab and use Acrobat on a Mac to pull out the individual
files. It's probably not a hard problem to solve, but I don't know of
any open-source programs that do this yet.

--
Anthony J. Bentley
b>

From: Anthony Bentley
Date: Monday, December 6, 2010 - 3:19 pm

Here is the Ghostscript bug:
http://bugs.ghostscript.com/show_bug.cgi?id=690422

From here it looks like you might be able to get it with gs after all.

This forum thread claims that Okular can view PDF portfolios as well:
http://www.linuxquestions.org/questions/linux-software-2/pdf-portfolio-833748/

--
Anthony J. Bentley

From: Clint Pachl
Date: Tuesday, December 7, 2010 - 12:40 am

Good research Anthony. That bug describes my situation exactly. The only 
thing is that I didn't know what the hell a portfolio PDF was until now.

Unfortunately, the gs ports is version 8.63 (released 2008-08-01). This 
bug report/fix happened in April 2009.

Shit, now Mr. Schroder is going to be on my ass about patches again. :-P

From: Sebastian Reitenbach
Date: Tuesday, December 7, 2010 - 1:47 am

kili@ posted a ghostscript update to ports@ in October IIRC, you may consult 
the archives.

cheers,
Sebastian

From: Greg Jones
Date: Tuesday, December 7, 2010 - 4:14 pm

You may want to look at Pdftk at http://www.pdflabs.com/.

You may be able to use Pdftk to massage the pdf file you can open it.

I don't know if it will build on OpenBSD (although there is a FreeBSD port.)

Regards,



From: Brynet
Date: Saturday, December 4, 2010 - 7:17 pm

Hi,

Why are you using xpdf? it's so old and crummy :-).

print/epdfview, which uses the poppler library.
textproc/mupdf, independent renderer, pretty good.

-Bryan.

From: patrick keshishian
Date: Saturday, December 4, 2010 - 8:05 pm

i have pdfs that mupdf doesn't display properly.

--patrick

From: Abel Abraham Camarillo Ojeda
Date: Saturday, December 4, 2010 - 8:19 pm

There is also textproc/zathura.

From: shwegime
Date: Sunday, December 5, 2010 - 12:02 am

zathura is really cool! Didn't know about it. But the default key bindings 
are really weird. I did tried many in the past, but had always to go back 
to acroread.

From: Clint Pachl
Date: Saturday, December 4, 2010 - 9:09 pm

All I can say is that I use cwm and don't like interfaces, GTK, gnome, 
or KDE. I highly agree with Patrick.

From: Brynet
Date: Saturday, December 4, 2010 - 9:35 pm

I also use cwm, but that doesn't means I completely avoid applications
using GTK+ or even Qt, there aren't a whole lot of programs using xlib
or xcb directly.

You just asked for a way to display your files, my apologies for
suggesting that you step outside of your comfort zone. ;-)

Good luck,
-Bryan.

From: Jona Joachim
Date: Sunday, December 5, 2010 - 12:14 am

AFAIK the poppler library is based on xpdf code so the result would be
about the same.


Best regards,
Jona

-- 
Worse is better
    Richard P. Gabriel

From: Joachim Schipper
Date: Monday, December 6, 2010 - 1:04 am

This is cheating, but have you tried throwing it into Google docs?

		Joachim

From: Clint Pachl
Date: Monday, December 6, 2010 - 2:42 pm

Damn Joachim, nice cheat! I can't believe I didn't think of giving this 
a try.

I was hopeful it would work. Unfortunately, I get the same error:

"For the best experience, open this PDF portfolio in Acrobat 9 or Adobe 
Reader 9, or later."


I'd also like to mention I tried the pdftops and pdf2ps commands without 
success. Still get a single page PDF stating the above message.

I guess it has to do with this PDF being a portfolio, like Anthony 
Bentley mentioned.

Thanks,
Clint

From: Joel Wiramu Pauling
Date: Monday, December 6, 2010 - 3:04 pm

I would be surprised if okular didn't open it. (okular being the KDE viewer)


From: Clint Pachl
Date: Monday, December 6, 2010 - 3:30 pm

I don't have KDE so I can't test. But I did find this link:

http://forum.kde.org/viewtopic.php?f=20&t=91242

It looks like portfolio PDFs are not supported, although someone there 
mentions a possible hack. okular apparently uses poppler as the backend. 
Poppler is a fork of xpdf-3.0, so we're back to square one.

From: Martin Schröder
Date: Monday, December 6, 2010 - 4:21 pm

To quote the mailing list motto: Stop whining. Where's the patch? ;-}

I can find no bug report in the podofo bugzilla.

Best
   Martin

From: ropers
Date: Monday, December 6, 2010 - 5:30 pm

How are the constituent PDFs stored in the portfolio PDF? Unencrypted?
Would it be possible to simply use file carving
<http://www.forensicswiki.org/wiki/File_Carving> to extract them?
There are unix file carving programs such as scalpel or foremost, but
I don't think there is an OpenBSD port. One can try to do things
manually with a hex editor of course. Does anyone have a link to a
copy of the OP's original offending PDF, so I could try to poke it in
this way? (I'm not gonna register w/ UPS just to see that guide.)

NB: When googling for the guide, I found this:
http://aricmackey.com/2008/04/fail-ups-developers-guide/ Not sure if
it still applies.

PS I just did some groping around inside some other portfolio PDF
file, but it doesn't seem to be just simple concatenation.

From: Clint Pachl
Date: Monday, December 6, 2010 - 11:23 pm

pdfinfo says they are encrypted, although it is probably only reporting 

I posted one here for you to play with: http://pachl.us/ups.pdf

Thanks,
Clint

Previous thread: pf/nat/dns setup question by ramrunner on Saturday, December 4, 2010 - 4:20 pm. (1 message)

Next thread: Apache with latest snapshot by James A. Peltier on Saturday, December 4, 2010 - 7:31 pm. (2 messages)