M Markos Well-Known Member Licensed User Longtime User Mar 2, 2020 #1 Dear All, I would like to load a pdf file from a URL using either the rewrap of pdfbox or other class or object. Any suggestions most welcomed. Thanks
Dear All, I would like to load a pdf file from a URL using either the rewrap of pdfbox or other class or object. Any suggestions most welcomed. Thanks
DonManfred Expert Licensed User Longtime User Mar 3, 2020 #3 There is no such method in PDFBox. You need to download the PDF with okhttputils2 first. Upvote 0
M Markos Well-Known Member Licensed User Longtime User Mar 3, 2020 #4 Out of curiousity the downliaded file is not easily accessible by other apps or users poking around Upvote 0
DonManfred Expert Licensed User Longtime User Mar 3, 2020 #5 It is saved on the pc where you use that b4j app. And can be found if a user poke around. He still need to password to show it with another viewer Last edited: Mar 3, 2020 Upvote 0
It is saved on the pc where you use that b4j app. And can be found if a user poke around. He still need to password to show it with another viewer
M Markos Well-Known Member Licensed User Longtime User Mar 3, 2020 #7 Yes password pritected would be the savings grace. I will keep trying to find a streaming load version Upvote 0
Yes password pritected would be the savings grace. I will keep trying to find a streaming load version
M Markos Well-Known Member Licensed User Longtime User Mar 3, 2020 #9 The windows acrobat.dll and exe has the option to load via url. There must be a method we can use in conjunction with native java we can achieve same. Or Im too stubborn to give up just yet Upvote 0
The windows acrobat.dll and exe has the option to load via url. There must be a method we can use in conjunction with native java we can achieve same. Or Im too stubborn to give up just yet
M Markos Well-Known Member Licensed User Longtime User Mar 3, 2020 #10 PDDocument pddDocument = PDDocument.load(new URL("http://<website name>/<file name>.pdf")); I keep seeing this in natuve java can we leverage this call within b4j? Upvote 0
PDDocument pddDocument = PDDocument.load(new URL("http://<website name>/<file name>.pdf")); I keep seeing this in natuve java can we leverage this call within b4j?
stevel05 Expert Licensed User Longtime User Mar 3, 2020 #11 Markos said: The windows acrobat.dll and exe has the option to load via url. Click to expand... I guess the acrobat software has the download code within it, it will achieve the same result if you download the file and save it to a temporary location the access it from there.. Upvote 0
Markos said: The windows acrobat.dll and exe has the option to load via url. Click to expand... I guess the acrobat software has the download code within it, it will achieve the same result if you download the file and save it to a temporary location the access it from there..
DonManfred Expert Licensed User Longtime User Mar 3, 2020 #12 Markos said: PDDocument pddDocument = PDDocument.load(new URL("http://<website name>/<file name>.pdf")); I keep seeing this in natuve java can we leverage this call within b4j? Click to expand... Where did you see it in the pdfbox documentation? Upvote 0
Markos said: PDDocument pddDocument = PDDocument.load(new URL("http://<website name>/<file name>.pdf")); I keep seeing this in natuve java can we leverage this call within b4j? Click to expand... Where did you see it in the pdfbox documentation?
DonManfred Expert Licensed User Longtime User Mar 3, 2020 #13 stevel05 said: it will achieve the same result if you download the file and save it to a temporary location the access it from there.. Click to expand... See #3 Upvote 0
stevel05 said: it will achieve the same result if you download the file and save it to a temporary location the access it from there.. Click to expand... See #3
stevel05 Expert Licensed User Longtime User Mar 3, 2020 #14 DonManfred said: See #3 Click to expand... Yes, just re-iterating Upvote 0
stevel05 Expert Licensed User Longtime User Mar 3, 2020 #15 In the documentation for PDFBox V 1.8.12 https://pdfbox.apache.org/docs/1.8.12/javadocs/index.html?org/apache/pdfbox/pdmodel/PDDocument.html there is a load from URL method. This seems to have been removed from V2.0.13. https://pdfbox.apache.org/docs/2.0.13/javadocs/ (sorry, can't link directly to the class) Upvote 0
In the documentation for PDFBox V 1.8.12 https://pdfbox.apache.org/docs/1.8.12/javadocs/index.html?org/apache/pdfbox/pdmodel/PDDocument.html there is a load from URL method. This seems to have been removed from V2.0.13. https://pdfbox.apache.org/docs/2.0.13/javadocs/ (sorry, can't link directly to the class)
M Markos Well-Known Member Licensed User Longtime User Mar 3, 2020 #16 The ability to load has been satisfied, I was deliberating how to avoid not having to download and have it exist on the local OS but I have a feeling in some shape or form it may be unavoidable so the best case is that the pdf must be password protected to retain some protection from copying and printing by the end user Upvote 0
The ability to load has been satisfied, I was deliberating how to avoid not having to download and have it exist on the local OS but I have a feeling in some shape or form it may be unavoidable so the best case is that the pdf must be password protected to retain some protection from copying and printing by the end user
DonManfred Expert Licensed User Longtime User Mar 3, 2020 #17 my pdfbox wrapper is based on pdfbox 2.0.17. So i guess there is nothing i can do. Upvote 0
M Markos Well-Known Member Licensed User Longtime User Mar 3, 2020 #18 stevel05 said: In the documentation for PDFBox V 1.8.12 https://pdfbox.apache.org/docs/1.8.12/javadocs/index.html?org/apache/pdfbox/pdmodel/PDDocument.html there is a load from URL method. This seems to have been removed from V2.0.13. https://pdfbox.apache.org/docs/2.0.13/javadocs/ (sorry, can't link directly to the class) Click to expand... That's what I was seeing but perhaps even that being said they may be just facilitating an implicit download via URL which puts me right back to as if loading a local file copy. So I will say issue closed as that is an acrobat limitation and all classes supporting same. But I have a work around thanks to everyone's help and must have password applied to ensure some protection from copy and printing. Upvote 0
stevel05 said: In the documentation for PDFBox V 1.8.12 https://pdfbox.apache.org/docs/1.8.12/javadocs/index.html?org/apache/pdfbox/pdmodel/PDDocument.html there is a load from URL method. This seems to have been removed from V2.0.13. https://pdfbox.apache.org/docs/2.0.13/javadocs/ (sorry, can't link directly to the class) Click to expand... That's what I was seeing but perhaps even that being said they may be just facilitating an implicit download via URL which puts me right back to as if loading a local file copy. So I will say issue closed as that is an acrobat limitation and all classes supporting same. But I have a work around thanks to everyone's help and must have password applied to ensure some protection from copy and printing.
stevel05 Expert Licensed User Longtime User Mar 3, 2020 #19 If the File is loaded into memory, you may be able to delete the temporary file as soon as it's been loaded (if you don't need it again), at the very least you can delete it when you exit the app. Upvote 0
If the File is loaded into memory, you may be able to delete the temporary file as soon as it's been loaded (if you don't need it again), at the very least you can delete it when you exit the app.
M Markos Well-Known Member Licensed User Longtime User Mar 3, 2020 #20 It would be great to delete as loaded but it nay not be possuble as it is being used unless adobe did somdthibg right and made a copy in memory to release the file. But will try it to see Upvote 0
It would be great to delete as loaded but it nay not be possuble as it is being used unless adobe did somdthibg right and made a copy in memory to release the file. But will try it to see