Re: Loading a PDF using InputStream

2024-02-01 Thread Tilman Hausherr
P.S.: thank you for having investigated and reported this! Tilman On 01.02.2024 16:06, Tilman Hausherr wrote: Oh. I had looked at the trunk and not at 3.0. That was likely a mistake in refactoring. Fixed in  https://issues.apache.org/jira/browse/PDFBOX-5757 and you get get a snapshot here ht

Re: Loading a PDF using InputStream

2024-02-01 Thread Tilman Hausherr
Oh. I had looked at the trunk and not at 3.0. That was likely a mistake in refactoring. Fixed in https://issues.apache.org/jira/browse/PDFBOX-5757 and you get get a snapshot here https://repository.apache.org/content/groups/snapshots/org/apache/pdfbox/pdfbox-app/3.0.2-SNAPSHOT/ Tilman On 01

Re: Loading a PDF using InputStream

2024-02-01 Thread Lars Juel Jensen
That is weird.. The source file I am looking at for version 3.0.1 does not pass it: --> https://github.com/apache/pdfbox/blob/3.0.1/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFParser.java#L91 On Wed, Jan 31, 2024 at 4:57 PM Tilman Hausherr wrote: > On 31.01.2024 16:19, Lars Juel Jensen w

Re: Loading a PDF using InputStream

2024-01-31 Thread Tilman Hausherr
On 31.01.2024 16:19, Lars Juel Jensen wrote: Well that's my problem.. It works with PDFBox2 with reasonable sized files. When it comes to the big ones it crashes.. So reading the migration guide for PDFBox3.0 I thought I saw some light in the tunnel as it says I can create my own reader and strea

Re: Loading a PDF using InputStream

2024-01-31 Thread Lars Juel Jensen
Well that's my problem.. It works with PDFBox2 with reasonable sized files. When it comes to the big ones it crashes.. So reading the migration guide for PDFBox3.0 I thought I saw some light in the tunnel as it says I can create my own reader and stream cache. I see that I can provide my own Random

Re: Loading a PDF using InputStream

2024-01-31 Thread Tilman Hausherr
On 31.01.2024 14:48, Lars Juel Jensen wrote: This creates another problem for me. I am running PDFBox in a kubernetes cluster on premises with limited resources. I can not setup persistent volume claims nor ephemeral volumes, and I can not change how my pods are started. I have limited resources

Re: Loading a PDF using InputStream

2024-01-31 Thread Lars Juel Jensen
This creates another problem for me. I am running PDFBox in a kubernetes cluster on premises with limited resources. I can not setup persistent volume claims nor ephemeral volumes, and I can not change how my pods are started. I have limited resources and an emptyDir that is mounted on /tmp where t

Re: Loading a PDF using InputStream

2024-01-31 Thread Tilman Hausherr
On 31.01.2024 09:50, Lars Juel Jensen wrote: In PDFBox2 I could do: PDDocument.load(inputStream, MemoryUsageSetting.setupTempFileOnly()) But there is no equivalent to this in PDFBox3. How do I read a PDF from an inputstream? |Loader.loadPDF(new RandomAccessReadBuffer(inputStream), IOUtils.c

Loading a PDF using InputStream

2024-01-31 Thread Lars Juel Jensen
In PDFBox2 I could do: PDDocument.load(inputStream, MemoryUsageSetting.setupTempFileOnly()) But there is no equivalent to this in PDFBox3. How do I read a PDF from an inputstream?