Request: IsPDF function

Discuss PDF file handling with the Polybios plugin here
User avatar
jPV
Posts: 600
Joined: Sat Mar 26, 2016 10:44 am
Location: RNO
Contact:

Request: IsPDF function

Post by jPV »

Would it be possible to make an IsPDF function to check if PDF is recognized and can be opened? I have some PDF files which fail to open and would be nice to be able to check them in a clean way rather than writing a custom error handling routine.
User avatar
Juan Carlos
Posts: 884
Joined: Mon Sep 06, 2010 1:02 pm

Re: Request: IsPDF function

Post by Juan Carlos »

Do you try to make one Pdf program with Políticos?
I do this question because I think that instead of all Hollywood user we try to make our own Pdf program, someone of our make it. Because it is interesting a new Pdf program for all Amiga systems made with Hollywood.
User avatar
jPV
Posts: 600
Joined: Sat Mar 26, 2016 10:44 am
Location: RNO
Contact:

Re: Request: IsPDF function

Post by jPV »

I'm adding PDF support to RNOComics, but I have to rewrite some stuff and it probably will be a bit hack&patch style solution, because it doesn't suit directly to the structure I've made for earlier purposes :) But I'm expecting that it will be OK to use RNOComics as a generic PDF reader too, and not just comics reader.

But I'm not planning to add more PDF specific features for now, mainly just PDF support to the current design. Sooo.. if someone wants to write a totally dedicated program for PDFs, I guess there's room for it too.
User avatar
Juan Carlos
Posts: 884
Joined: Mon Sep 06, 2010 1:02 pm

Re: Request: IsPDF function

Post by Juan Carlos »

Perhaps the option will be make a little bounty for someone try to make a pdf reader with polybios.
User avatar
airsoftsoftwair
Posts: 5425
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Request: IsPDF function

Post by airsoftsoftwair »

Yes, can be added.
User avatar
jPV
Posts: 600
Joined: Sat Mar 26, 2016 10:44 am
Location: RNO
Contact:

Re: Request: IsPDF function

Post by jPV »

Maybe it could also return number of pages in the PDF, to get that more straightforward way? Or possibly some other information too...
User avatar
airsoftsoftwair
Posts: 5425
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Request: IsPDF function

Post by airsoftsoftwair »

jPV wrote:Maybe it could also return number of pages in the PDF, to get that more straightforward way? Or possibly some other information too...
This would require PDF parsing and would slow down the IsPDF() function so it's better to use OpenDocument() if you need additional information.
User avatar
airsoftsoftwair
Posts: 5425
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Request: IsPDF function

Post by airsoftsoftwair »

Code: Select all

- New: Added pdf.IsPDF() function; this can be used to check if the specified file is a PDF document
User avatar
jPV
Posts: 600
Joined: Sat Mar 26, 2016 10:44 am
Location: RNO
Contact:

Re: Request: IsPDF function

Post by jPV »

Thanks!

BTW. I've forgot to ask earlier, but I got these couple PDF files (link) from one user and they don't open with Polybios. They do work with APDF and VPDF... so any idea why they don't work with Polybios?
User avatar
airsoftsoftwair
Posts: 5425
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Request: IsPDF function

Post by airsoftsoftwair »

Which system is he on? On Windows, those PDFs can be opened just fine...
Post Reply