pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tilman Hausherr <THaush...@t-online.de>
Subject Re: catch(IOException | COSVisitorException e)
Date Sat, 15 Jul 2017 16:49:49 GMT
PDFBox 2 doesn't require JDK7. Only the trunk does, i.e. PDFBox 3.

Tilman

Am 15.07.2017 um 18:47 schrieb Christopher Schultz:
> Steve,
>
> On 7/14/17 6:31 AM, Steve Carr wrote:
>> Thanks for the info.
>> The user uses Java 6 interpreter.
>> Do you know if the 2.0.* versions of PDFBox will work on Java 6
>> platforms?>
>> If not how can I find code which will run on Java 6
> It's worth pointing-out that multi-catch is just syntactic sugar: the
> .class file is the same as it would have been if the catch blocks had
> been separate (except that you'd see different source lines in any stack
> traces).
>
> So just because PDFBox 2 requires Java 7 to compile, it doesn't require
> Java 7 to run.
>
> -chris
>> On 2017-06-26 19:45 (+0100), Tilman Hausherr wrote:
>>> Use the source code examples from the source code download, not from >
>>> some third party websites.>
>>>
>>> Btw COSVisitorException no longer exists in the 2.0.* versions.>
>>>
>>> Tilman>
>>>
>>>
>>>
>>>
>>> Am 26.06.2017 um 11:41 schrieb Steve Carr:>
>>>> import java.io.IOException;>
>>>> import org.apache.pdfbox.exceptions.COSVisitorException;>
>>>> import org.apache.pdfbox.pdmodel.PDDocument;>
>>>> import org.apache.pdfbox.pdmodel.PDPage;>
>>>> /**>
>>>> *>
>>>> * @author Azeem>
>>>> * @Email azeem@radixcode.com>
>>>> */>
>>>>>
>>>> When I compile the following code in netbeans I get>
>>>> Uncompilable source code - package org.apache.pdfbox.exceptions does not
exist in relation tocatch(IOException | COSVisitorException e)>
>>>> I downloaded pdfbox-1.6.0-src.zip>
>>>> help>
>>>> steve>
>>>> public class Main {>
>>>>>
>>>> public static void main(String[] args) {>
>>>> System.out.println("Create Simple PDF file with blank Page");>
>>>> String fileName = "EmptyPdf.pdf"; // name of our file>
>>>> try{>
>>>> PDDocument doc = new PDDocument(); // creating instance of pdfDoc>
>>>> doc.addPage(new PDPage()); // adding page in pdf doc file>
>>>> doc.save(fileName); // saving as pdf file with name perm>
>>>> doc.close(); // cleaning memory>
>>>> System.out.println("your file created in : "+ System.getProperty("user.dir"));>
>>>>>
>>>> }>
>>>> catch(IOException | COSVisitorException e){>
>>>> System.out.println(e.getMessage());>
>>>> }>
>>>> }>
>>>> }>
>>>
>>> --------------------------------------------------------------------->
>>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org>
>>> For additional commands, e-mail: users-help@pdfbox.apache.org>
>>>
>>>
>>
>> Sent from my iPad
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
>> For additional commands, e-mail: users-help@pdfbox.apache.org
>>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


Mime
View raw message