Re: PDFBox 2.0.x deprecation or end-of-life

2024-07-08 Thread Larry Lynn
Thank you for the swift Response, Tilman. This is useful and will help us plan a timeline for our eventual PDFBox 3.0.x migration. Regards, Larry Lynn p.s. Sorry I was slow getting back to you. It looks like I was properly subscribed to the dev mailing list but not the users mailing list. I b

Re: PDFBox 2.0.x deprecation or end-of-life

2024-07-02 Thread Tilman Hausherr
Hi, There's no decision at this time, and the current version is 2.0.31. My (personal) opinion is to keep 2.0.* for a long time. The best to prepare migration is to have enough tests, especially ones that compare created / rendered PDFs or whatever other features you're using. Tilman On 0

PDFBox 2.0.x deprecation or end-of-life

2024-07-02 Thread Larry Lynn
Hi Guys. My team has used PDFBox for a number of years now. It's an awesome piece of software and we're really grateful for all the work that you've done on it. We are currently using PDFBox 2.0.28. We are aware that the PDFBox 3.0.x branch has come out of beta and is now on mainline support.

Re: PDFBox 2.0.x - Skip text rendering

2020-03-03 Thread Tilman Hausherr
I meant delete the content of the method, but what you did is of course fine too. If your file is not confidential then it would be great that you'd open an issue in JIRA an attach the file. I wonder if this is a broken font, or an undiscovered bug in our IO handling. Tilman Am 03.03.2020

Re: PDFBox 2.0.x - Skip text rendering

2020-03-03 Thread Philippe Fisher
I tried deleting PageDrawer.showFontGlyph(), but then the project doesn't build anymore. Wrapping the content of PageDrawer.showFontGlyph() with a try catch worked perfectly! @Override protected void showFontGlyph(Matrix textRenderingMatrix, PDFont font, int code, String unicode,

Re: PDFBox 2.0.x - Skip text rendering

2020-03-03 Thread Tilman Hausherr
Hi, Try to delete the content of PageDrawer.showFontGlyph(). Tilman Am 03.03.2020 um 16:13 schrieb Philippe Fisher: Hello, I am currently using pdfBox 2.0.18 to extract an image from the first page of pdf documents in order to create a thumbnail. For certain documents, the rendering fails lik

PDFBox 2.0.x - Skip text rendering

2020-03-03 Thread Philippe Fisher
Hello, I am currently using pdfBox 2.0.18 to extract an image from the first page of pdf documents in order to create a thumbnail. For certain documents, the rendering fails like so: Exception in thread "main" java.io.EOFException: premature EOF at org.apache.fontbox.ttf.TTFDataStream.re

Re: RE: drawing images with rotation PDFBox 2.0

2017-12-20 Thread mress...@gmail.com
rch 07, 2016 12:24 PM > To: users@pdfbox.apache.org > Subject: Re: drawing images with rotation PDFBox 2.0 > > rotation is around the lower left axis. That is why I wrote a few days > ago: "90° rotated in clock direction would be you'd have to adjust the Y > value,

Re: What's the replacement for TextNormalize class in PDFBox 2.0 ?

2017-11-21 Thread Tilman Hausherr
Am 21.11.2017 um 09:57 schrieb Shyam Sundar: Hi, We were using this TextNormalize class and its methods like makeLineLogicalOrder(), normalizePres(), etc in our project before upgrading PDFBox library to 2.0, but apparently this class is not available in 2.0. I referred migration guide at https

What's the replacement for TextNormalize class in PDFBox 2.0 ?

2017-11-21 Thread Shyam Sundar
Hi, We were using this TextNormalize class and its methods like makeLineLogicalOrder(), normalizePres(), etc in our project before upgrading PDFBox library to 2.0, but apparently this class is not available in 2.0. I referred migration guide at https://pdfbox.apache.org/2.0/migration.html, but co

Re: Setting Page Layout to Default in PDFBox 2.0

2017-03-06 Thread Gilad Denneboom
Thanks a lot, that did the trick! And if someone is reading this and wants to do the same to the Magnification setting (ie, set it to Default), you can just set the document's OpenAction to null. On Mon, Mar 6, 2017 at 10:51 PM, Tilman Hausherr wrote: > Am 06.03.2017 um 22:37 schrieb Gilad Denn

Re: Setting Page Layout to Default in PDFBox 2.0

2017-03-06 Thread Tilman Hausherr
Am 06.03.2017 um 22:37 schrieb Gilad Denneboom: When I select the "Default" option in Acrobat it doesn't behave the same as the "Single Page" option, though, and when I examine the file's internal structure I can see that the Default option basically means that the PageLayout parameter is missing

Re: Setting Page Layout to Default in PDFBox 2.0

2017-03-06 Thread Gilad Denneboom
When I select the "Default" option in Acrobat it doesn't behave the same as the "Single Page" option, though, and when I examine the file's internal structure I can see that the Default option basically means that the PageLayout parameter is missing from the Root. So should it not be possible to re

Re: Setting Page Layout to Default in PDFBox 2.0

2017-03-06 Thread Tilman Hausherr
Am 06.03.2017 um 20:21 schrieb Gilad Denneboom: It was this: doc.getDocumentCatalog().setPageLayout("Default"); There is no such layout. It is kindof a bug that 1.8 allowed you to pass an invalid value. Valid values: SinglePageDisplay one page at a time OneColumnDisplay the pages in one colu

Re: Setting Page Layout to Default in PDFBox 2.0

2017-03-06 Thread Gilad Denneboom
It was this: doc.getDocumentCatalog().setPageLayout("Default"); On Mon, Mar 6, 2017 at 6:26 PM, Tilman Hausherr wrote: > Am 06.03.2017 um 16:53 schrieb Gilad Denneboom: > >> Hi all, >> >> I'm setting various Initial View settings, including the Page Layout >> setting which I want to set as Defau

Re: Setting Page Layout to Default in PDFBox 2.0

2017-03-06 Thread Tilman Hausherr
Am 06.03.2017 um 16:53 schrieb Gilad Denneboom: Hi all, I'm setting various Initial View settings, including the Page Layout setting which I want to set as Default, but this does not seem to be one of the options of the PageLayout enum, nor does it accept it when I use the fromString method and

Setting Page Layout to Default in PDFBox 2.0

2017-03-06 Thread Gilad Denneboom
Hi all, I'm setting various Initial View settings, including the Page Layout setting which I want to set as Default, but this does not seem to be one of the options of the PageLayout enum, nor does it accept it when I use the fromString method and supply "Default", "" or null as the input paramete

Re: multithreading in PDFBox 2.0

2016-06-30 Thread John Hewson
;> The only way was to create new PDDocument of that single file in every >> thread. >> >> Is there any changes in PDFBox 2.0 in this respect? >> Is it possible to render pages to images in multiple threads? (without >> opening new PDDocument in every thread) >

Re: multithreading in PDFBox 2.0

2016-06-29 Thread Tilman Hausherr
in PDFBox 2.0 in this respect? Is it possible to render pages to images in multiple threads? (without opening new PDDocument in every thread) No. Tilman - To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org For

multithreading in PDFBox 2.0

2016-06-29 Thread jlonc
Hi, I used to work with PDFBox 1.8, and it was not thread safe. Like rendering of multiple pages at the same time was not possible (not reliable). The only way was to create new PDDocument of that single file in every thread. Is there any changes in PDFBox 2.0 in this respect? Is it possible to

Re: Pdfbox 2.0 Forms

2016-06-22 Thread dj.la...@gmx.de
Hello, i have make some tests. So i thinks its the PDFRenderer. When I open a pdf, fill out the form and safe it as png, then the fields are not filled out. Save it as pdf, works. But i have a solution: //Open the form doc = PDDocument.load(new File(Client.class.getResource("/resources/pdf/d

Re: Pdfbox 2.0 Forms

2016-06-22 Thread Maruan Sahyoun
Hi, > Am 22.06.2016 um 13:21 schrieb Aaron Mulder : > > So I've had an issue with a third-party PDF with forms where once I > complete the form the layout of the completed form field text is > slightly different in Preview on the Mac compared to Acrobat Reader on > Windows, and also across browse

Re: Pdfbox 2.0 Forms

2016-06-22 Thread Aaron Mulder
So I've had an issue with a third-party PDF with forms where once I complete the form the layout of the completed form field text is slightly different in Preview on the Mac compared to Acrobat Reader on Windows, and also across browsers with built-in pdf rendering. For instance, the text might be

Re: Pdfbox 2.0 Forms

2016-06-22 Thread Maruan Sahyoun
Hi, > Am 22.06.2016 um 10:55 schrieb dj.la...@gmx.de: > > > > Hello, > > i have a little problem after update from 1.8 to 2.0. > > I open a pdf form, witch was created from libreoffice, fillout the form, and > show it with pdfrenderer. > After update to 2.0 the fill out form fields was not

Pdfbox 2.0 Forms

2016-06-22 Thread DJ . Larry
Hello,   i have a little problem after update from 1.8 to 2.0.   I open a pdf form, witch was created from libreoffice, fillout the form, and show it with pdfrenderer. After update to 2.0 the fill out form fields was not shown at image. When i save the document to file, the fill out data are inc

Re: PDFBox 2.0 and Batik

2016-05-11 Thread Ivan Ridao Freitas
Just to close this thread, I simplified my app. Instead of the process SVG -> convert to PDF -> insert to PDF invoice, now I just take a PDF and insert it with LayerUtility (like in SuperimposePage example) to the final PDF. In other words, I wanted to include company logos in SVG to an invoic

Re: PDFBox 2.0 and Batik

2016-05-10 Thread John Hewson
> On 10 May 2016, at 12:49, Iván Ridao Freitas wrote: > > Yes, that's the case but I guess no one on the other side (FOP) is going to > update the code to support PDFBox 2.0. In my case, I depend on the latest > PDFBox version. That’s unfortunate. I guess you could ru

Re: PDFBox 2.0 and Batik

2016-05-10 Thread Iván Ridao Freitas
Yes, that's the case but I guess no one on the other side (FOP) is going to update the code to support PDFBox 2.0. In my case, I depend on the latest PDFBox version. Ivan On 10/5/2016 4:12 p. m., John Hewson wrote: Ah, so the pdf-transcoder jar of Batik depends upon FOP, which in

Re: PDFBox 2.0 and Batik

2016-05-10 Thread John Hewson
at > org.apache.batik.apps.rasterizer.SVGConverter.execute(Unknown Source) > > My mistake, the incompatible lib seems to be FOP. Ah, so the pdf-transcoder jar of Batik depends upon FOP, which in turn depends upon FontBox. But Maven should handle that for you. Perhaps the issue is th

Re: PDFBox 2.0 and Batik

2016-05-10 Thread Ivan Ridao Freitas
I use this code: SVGConverter converter = new SVGConverter(); converter.setDestinationType(DestinationType.PDF); converter.setSources(new String[] { svg.getAbsolutePath() }); converter.setDst(pdf); converter.execute(); with 'org.apache.xmlgraphics:batik-ra

Re: PDFBox 2.0 and Batik

2016-05-10 Thread John Hewson
> On 10 May 2016, at 08:47, Ivan Ridao Freitas wrote: > > I'm trying to add an SVG to a PDF with Apache Batik, but some code changes > made it incompatible with PDFBox 2.0.1. Batik does not depend on PDFBox so an incompatibility there is not possible. > The first exception is: java.lang.NoSuc

PDFBox 2.0 and Batik

2016-05-10 Thread Ivan Ridao Freitas
I'm trying to add an SVG to a PDF with Apache Batik, but some code changes made it incompatible with PDFBox 2.0.1. The first exception is: java.lang.NoSuchMethodError: org.apache.fontbox.cff.CFFFont.getProperty(Ljava/lang/String;)Ljava/lang/Object; I tried to manually override the class to ad

Re: PDFBox 2.0 - Loading PDDocument from stream loses track of PDAcroForm

2016-04-13 Thread Barry Neu
Made the suggested modification and that resolved the issue - not sure how I missed that - thank you. I had sent the attachments from another email client because I wasn’t aware attachments were being stripped on the other end. Thanks again. > On Apr 13, 2016, at 10:43 AM, Tilman Hausherr wrot

Re: PDFBox 2.0 - Loading PDDocument from stream loses track of PDAcroForm

2016-04-13 Thread Tilman Hausherr
Am 13.04.2016 um 18:37 schrieb Barry Neu: With attachments. "upload" isn't "send it again". However as a mod I had a look at the java: private static PDDocument getTemplate(String urlPath) { InputStream is = null; PDDocument doc = new PDDocument(); try {

Re: PDFBox 2.0 - Loading PDDocument from stream loses track of PDAcroForm

2016-04-13 Thread Branden Visser
The list filters them out. You need to upload them somewhere and provide a link. On Wed, Apr 13, 2016 at 9:37 AM, Barry Neu wrote: > With attachments. > > > From: Barry Neu > Date: Wednesday, April 13, 2016 at 10:32 AM > To: Barry Neu > Subject: Fwd: PDFBox 2.0 - Loading P

Re: PDFBox 2.0 - Loading PDDocument from stream loses track of PDAcroForm

2016-04-13 Thread Barry Neu
With attachments. From: Barry Neu Date: Wednesday, April 13, 2016 at 10:32 AM To: Barry Neu Subject: Fwd: PDFBox 2.0 - Loading PDDocument from stream loses track of PDAcroForm Begin forwarded message: From: Tilman Hausherr mailto:thaush...@t-online.de>> Subject: Re: PDFBox 2.0 - L

Re: PDFBox 2.0 - Loading PDDocument from stream loses track of PDAcroForm

2016-04-13 Thread Tilman Hausherr
Am 13.04.2016 um 17:40 schrieb Barry Neu: Hello. Sample Java code and PDF fillable form attached. These didn't go through. Please upload them somewhere. Tilman When trying to load the form from a url input stream, it appears the PDDocument, and PDDocumentCatalog are instantiated but making

PDFBox 2.0 - Loading PDDocument from stream loses track of PDAcroForm

2016-04-13 Thread Barry Neu
Hello. Sample Java code and PDF fillable form attached. When trying to load the form from a url input stream, it appears the PDDocument, and PDDocumentCatalog are instantiated but making a call to PDDocumentCatalog.getAcroForm() returns null. The same PDF template loads fine from the file system

Re: PdfBox 2.0 scale to A4 while printing document

2016-03-28 Thread Tres Finocchiaro
Please forgive me for bumping an old thread, but has anyone tried 2.0.0 with custom margins when using a non-zero density? With density zero, we get desired results, but if we specify the DPI (force rasterization), we get some strange margins on the right and on the bottom Preview: https://cl

Re: Log4j message PDFBox 2.0

2016-03-19 Thread Tilman Hausherr
Am 16.03.2016 um 19:16 schrieb Stahle, Patrick: Hi, I see the following debug log message: 493 [Finalizer] DEBUG org.apache.pdfbox.io.ScratchFileBuffer - ScratchFileBuffer not closed! Is this something be concerned about? It is PDFBox that noticed a flaw in PDFBox and doing the closing its

Log4j message PDFBox 2.0

2016-03-19 Thread Stahle, Patrick
Hi, I see the following debug log message: 493 [Finalizer] DEBUG org.apache.pdfbox.io.ScratchFileBuffer - ScratchFileBuffer not closed! Is this something be concerned about? Thanks, Patrick

RE: drawing images with rotation PDFBox 2.0

2016-03-07 Thread Stahle, Patrick
in the right position. So simply I have to figure out the new x,y based off the angle -Original Message- From: Tilman Hausherr [mailto:thaush...@t-online.de] Sent: Monday, March 07, 2016 12:24 PM To: users@pdfbox.apache.org Subject: Re: drawing images with rotation PDFBox 2.0

Re: drawing images with rotation PDFBox 2.0

2016-03-07 Thread Tilman Hausherr
che.org Subject: RE: drawing images with rotation PDFBox 2.0 Ok, I am lot closer. This seems to work. The only thing right now is I don't think the position is correct, but I have to look at that a bit more... Seems like I have to first rotate & transform and then use the draw

RE: drawing images with rotation PDFBox 2.0

2016-03-07 Thread Stahle, Patrick
mid way down on the left hand side. Is the x, y position not starting form the bottom left? Thanks, Patrick -Original Message- From: Stahle, Patrick [mailto:patrick.sta...@te.com] Sent: Monday, March 07, 2016 9:57 AM To: users@pdfbox.apache.org Subject: RE: drawing images with rotation

RE: drawing images with rotation PDFBox 2.0

2016-03-07 Thread Stahle, Patrick
From: Stahle, Patrick [mailto:patrick.sta...@te.com] Sent: Monday, March 07, 2016 8:05 AM To: users@pdfbox.apache.org Subject: RE: drawing images with rotation PDFBox 2.0 I don't know how to do the rotation without AffineTransform, do you have a suggestion for at.rotate method call? ---

RE: drawing images with rotation PDFBox 2.0

2016-03-07 Thread Stahle, Patrick
with rotation PDFBox 2.0 Am 04.03.2016 um 21:27 schrieb Stahle, Patrick: > From the code below both images draw, but as soon as I uncomment out " > canvas.transform(new Matrix(at));" the first image does not draw or draws > where I can't see it. I mu

Re: drawing images with rotation PDFBox 2.0

2016-03-04 Thread Tilman Hausherr
); -Original Message- From: Tilman Hausherr [mailto:thaush...@t-online.de] Sent: Friday, March 04, 2016 3:08 PM To: users@pdfbox.apache.org Subject: Re: drawing images with rotation PDFBox 2.0 Am 04.03.2016 um 21:04 schrieb Stahle, Patrick: I tried the following but the image now no longer draws..

RE: drawing images with rotation PDFBox 2.0

2016-03-04 Thread Stahle, Patrick
ing images with rotation PDFBox 2.0 Am 04.03.2016 um 21:04 schrieb Stahle, Patrick: > I tried the following but the image now no longer draws... > AffineTransform at = new AffineTransform(rect.getWidth(), 0, 0, > rect.getHeight(), rect.getLowerLeftX(), rect.getLowerLeftY()); >

Re: drawing images with rotation PDFBox 2.0

2016-03-04 Thread Tilman Hausherr
y should it not keep the size? Also on a PDFBox 2.0 note, the "PDPageContentStream -> drawXObject' is deprecated and the source says to use drawImage instead. However I was not able to find a drawImage method that takes AffineTransform. What is the recommended way

RE: drawing images with rotation PDFBox 2.0

2016-03-04 Thread Stahle, Patrick
-online.de] Sent: Friday, March 04, 2016 2:44 PM To: users@pdfbox.apache.org Subject: Re: drawing images with rotation PDFBox 2.0 Am 04.03.2016 um 20:35 schrieb Stahle, Patrick: > Hi, > > I am struggling with rotating an image. For instance I have the following > code: > AffineTra

Re: drawing images with rotation PDFBox 2.0

2016-03-04 Thread Tilman Hausherr
t keep the size? Also on a PDFBox 2.0 note, the "PDPageContentStream -> drawXObject' is deprecated and the source says to use drawImage instead. However I was not able to find a drawImage method that takes AffineTransform. What is the recommended way to do thi

drawing images with rotation PDFBox 2.0

2016-03-04 Thread Stahle, Patrick
ch in this case squishing the image. Is this expected behavior, and if so is there way for an image to rotate and keep the sizing? I kind of hoped it work the same way as rotating text... Also on a PDFBox 2.0 note, the "PDPageContentStream -> drawXObject' is deprecated and the

Re: How do you create a Radio Button Group with PDFBox 2.0?

2016-01-22 Thread Tilman Hausherr
Am 22.01.2016 um 02:29 schrieb Adam Steen: I have a working solution to set default values and have acrobat render them. It was pure fluke that I got this result, but wanted to post it so other will know and to close out the solution. Thanks, this works nicely. You don't need the font and the

Re: How do you create a Radio Button Group with PDFBox 2.0?

2016-01-22 Thread Maruan Sahyoun
page.getAnnotations().add(widget); >} >radioButton.setWidgets(widgets); >System.out.println(radioButton.getOnValues()); >radioButton.setValue(selectedValue); >acroForm.getFields().add(radioButton); > >System.out.println(radioB

RE: How do you create a Radio Button Group with PDFBox 2.0?

2016-01-21 Thread Adam Steen
acroForm.getFields().add(radioButton); System.out.println(radioButton.getValue()); //acroForm.refreshAppearances(); // not implemented contents.close(); document.save(new FileOutputStream(fileName)); document.close(); } } Adam -----Original Message--

Re: How do you create a Radio Button Group with PDFBox 2.0?

2016-01-21 Thread Tilman Hausherr
-Original Message- From: Tilman Hausherr [mailto:thaush...@t-online.de] Sent: Thursday, 21 January 2016 4:29 PM To: users@pdfbox.apache.org Subject: Re: How do you create a Radio Button Group with PDFBox 2.0? Am 21.01.2016 um 06:51 schrieb Adam Steen: It seems without building an appearance I a

RE: How do you create a Radio Button Group with PDFBox 2.0?

2016-01-21 Thread Adam Steen
oes not want to render it. Is " pdAcroForm.setNeedAppearances(true);" a hack? Should I be rendering everything myself? Adam -Original Message- From: Tilman Hausherr [mailto:thaush...@t-online.de] Sent: Thursday, 21 January 2016 4:29 PM To: users@pdfbox.apache.org Subject: Re: How do you cre

Re: How do you create a Radio Button Group with PDFBox 2.0?

2016-01-21 Thread Tilman Hausherr
om.au] Sent: Thursday, 21 January 2016 8:26 AM To: users@pdfbox.apache.org Subject: RE: How do you create a Radio Button Group with PDFBox 2.0? Hi I did manage to get a Radio Group functioning, I have posted the code to my question on stack overflow -> http://stackoverflow.com/a/34895158/415681

RE: How do you create a Radio Button Group with PDFBox 2.0?

2016-01-20 Thread Adam Steen
Group with PDFBox 2.0? Hi I did manage to get a Radio Group functioning, I have posted the code to my question on stack overflow -> http://stackoverflow.com/a/34895158/415681 The next problem will be getting a default value set. Adam -Original Message- From: Tilman Haush

RE: How do you create a Radio Button Group with PDFBox 2.0?

2016-01-20 Thread Adam Steen
.de] Sent: Wednesday, 20 January 2016 5:47 PM To: users@pdfbox.apache.org Subject: Re: How do you create a Radio Button Group with PDFBox 2.0? Here's the code I did yesterday: http://justpaste.it/CreateRadioButtons The problem is that Adobe does things on its own even if the appearance streams

Re: How do you create a Radio Button Group with PDFBox 2.0?

2016-01-20 Thread Tilman Hausherr
Here's the code I did yesterday: http://justpaste.it/CreateRadioButtons The problem is that Adobe does things on its own even if the appearance streams are set. This seems to be related to the appearance characteristics (/MK). I haven't been able to teach it to "do nothing", or "do it all" whe

How do you create a Radio Button Group with PDFBox 2.0?

2016-01-19 Thread Adam Steen
Hi I want to create a Radio Button group using PDFBox 2.0, I am able to create 3 Radio Buttons, but I can't figure out how to group them (PDFBox 1.8, used PDRadioCollection<https://pdfbox.apache.org/docs/1.8.10/javadocs/org/apache/pdfbox/pdmodel/interactive/form/PDRadioCollection.htm

Re: How do I create a valid PDF/A document with PDFBOX 2.0?

2015-12-28 Thread Tilman Hausherr
Am 29.12.2015 um 02:02 schrieb Nakul Malhotra: How do you use pdfbox to extract?!!? https://pdfbox.apache.org/1.8/cookbook/textextraction.html |PDFTextStripper stripper = new PDFTextStripper(); stripper.setStartPage( 2 ); stripper.setEndPage( 3 ); stripper.getText( document ); |

Re: How do I create a valid PDF/A document with PDFBOX 2.0?

2015-12-28 Thread db123
it is written for PDFBOX 1.8 and I cannot get it to work for PDFBOX 2.0. I have searched the example folder but haven't been able to find an example or any other documentation on how to create a valid PDF/A document. It is in examples\src\main\java\org\apac

Re: How do I create a valid PDF/A document with PDFBOX 2.0?

2015-12-28 Thread Nakul Malhotra
ment about creating a valid PDF/A document: >>> >>> https://pdfbox.apache.org/1.8/cookbook/pdfacreation.html >>> >>> The problem is that it is written for PDFBOX 1.8 and I cannot get it to >>> work for PDFBOX 2.0. I have searched the example folder but haven

Re: How do I create a valid PDF/A document with PDFBOX 2.0?

2015-12-28 Thread db123
get it to work for PDFBOX 2.0. I have searched the example folder but haven't been able to find an example or any other documentation on how to create a valid PDF/A document. It is in examples\src\main\java\org\apache\pdfbox\examples\pdmodel\CreatePDFA.java in the ZIP

Re: How do I create a valid PDF/A document with PDFBOX 2.0?

2015-12-28 Thread Tilman Hausherr
Am 28.12.2015 um 23:56 schrieb Nakul Malhotra: what is the best way to go about learning how to use pdfBox? The best is to look at the examples, find the one the most similar to what you want to do. There's no "PDFBox in action" book or tutorial. If you want to do advanced things, you'll ne

Re: How do I create a valid PDF/A document with PDFBOX 2.0?

2015-12-28 Thread Nakul Malhotra
what is the best way to go about learning how to use pdfBox?

Re: How do I create a valid PDF/A document with PDFBOX 2.0?

2015-12-27 Thread Tilman Hausherr
Am 28.12.2015 um 04:40 schrieb db...@bergqvist.se: Hi, I have read this document about creating a valid PDF/A document: https://pdfbox.apache.org/1.8/cookbook/pdfacreation.html The problem is that it is written for PDFBOX 1.8 and I cannot get it to work for PDFBOX 2.0. I have searched the

How do I create a valid PDF/A document with PDFBOX 2.0?

2015-12-27 Thread db123
Hi, I have read this document about creating a valid PDF/A document: https://pdfbox.apache.org/1.8/cookbook/pdfacreation.html The problem is that it is written for PDFBOX 1.8 and I cannot get it to work for PDFBOX 2.0. I have searched the example folder but haven't been able to fi

PDFBox 2.0 : How to digital signature using Sun's PKCS#11 provider from smartcard ?

2015-11-29 Thread Eric Chow
Hello, Is there any example to do the digital signature using PKCS#11 (Smart card) using Sun's PKCS#11 provider? Best regards, Eric

Re: PDFBox 2.0 SVN Head: PDStream discontinued

2015-07-24 Thread Roberto Nibali
Hi On Fri, Jul 24, 2015 at 4:44 PM, Tilman Hausherr wrote: Am 24.07.2015 um 10:27 schrieb Roberto Nibali: > >> Hi >> >> Until last week, the following code worked just fine: >> >> public static String calculateFontSize(PDTextField field) throws >> IOException { >> PDFStreamParser parser = n

Re: PDFBox 2.0 SVN Head: PDStream discontinued

2015-07-24 Thread Tilman Hausherr
Am 24.07.2015 um 10:27 schrieb Roberto Nibali: Hi Until last week, the following code worked just fine: public static String calculateFontSize(PDTextField field) throws IOException { PDFStreamParser parser = new PDFStreamParser(new RandomAccessBuffer(field.getDefaultAppearance().getBytes()

PDFBox 2.0 SVN Head: PDStream discontinued

2015-07-24 Thread Roberto Nibali
Hi Until last week, the following code worked just fine: public static String calculateFontSize(PDTextField field) throws IOException { PDFStreamParser parser = new PDFStreamParser(new RandomAccessBuffer(field.getDefaultAppearance().getBytes())); parser.parse(); final List tokens = pa

Re: Bouncycastle Provider Suddenly Stopped Working wehn I went to PDFBox 2.0

2015-07-02 Thread John Hewson
> On 1 Jul 2015, at 23:21, Andreas Lehmkühler wrote: > > Hi, > >> Torgeir Veimo hat am 2. Juli 2015 um 05:54 >> geschrieben: >> >> >> I recently had some unexpected bouncy castle issues and didn't realise >> until I read this that the 2.0.0-SNAPSHOT actually includes the bouncy >> castle cla

Re: Bouncycastle Provider Suddenly Stopped Working wehn I went to PDFBox 2.0

2015-07-02 Thread Evan Williams
Thank you! I will check that out. On Thu, Jul 2, 2015 at 10:12 AM, Lachezar Dobrev wrote: > You might want to check if you're not being plagued by transitive > dependencies woes. > Use "mvn dependency:tree" to check the dependencies in your project. You > may be surprised. > > 2015-07-02 17:

Re: Bouncycastle Provider Suddenly Stopped Working wehn I went to PDFBox 2.0

2015-07-02 Thread Lachezar Dobrev
You might want to check if you're not being plagued by transitive dependencies woes. Use "mvn dependency:tree" to check the dependencies in your project. You may be surprised. 2015-07-02 17:09 GMT+03:00 Evan Williams : > I tried updating to bouncycastle 1.52 (I was using 1.50) and making my >

Re: Bouncycastle Provider Suddenly Stopped Working wehn I went to PDFBox 2.0

2015-07-02 Thread Evan Williams
I tried updating to bouncycastle 1.52 (I was using 1.50) and making my dependencies look as much like the ones in the examples pom.xml as possible, but it just does not work. It occurred to me that for the purposes of my application the pdf is just going to go straight to the printer and no end us

Re: Bouncycastle Provider Suddenly Stopped Working wehn I went to PDFBox 2.0

2015-07-02 Thread Evan Williams
But making a standalone jar is not what I am doing. Not at all. I have a web application that is deployed by maven. No jars were harmed in the making of this application. And as I said in my email this always always worked perfectly and I never ever got this error with 1.8.9. I am compliling exac

Re: Bouncycastle Provider Suddenly Stopped Working wehn I went to PDFBox 2.0

2015-07-02 Thread Torgeir Veimo
Ah, that explains it perfectly, thx! On 2 July 2015 at 16:21, Andreas Lehmkühler wrote: > Hi, > >> Torgeir Veimo hat am 2. Juli 2015 um 05:54 >> geschrieben: >> >> >> I recently had some unexpected bouncy castle issues and didn't realise >> until I read this that the 2.0.0-SNAPSHOT actually incl

Re: Bouncycastle Provider Suddenly Stopped Working wehn I went to PDFBox 2.0

2015-07-01 Thread Thomas Chojecki
Hi all, for crypto stuff the bc provider need to be signed (provider signature). Making a standalone jar (jar with dependencies) will break the signature of the jar. So registering the BC as provider will not work. You can see in the exception this message "JCE cannot authenticate the prov

Re: Bouncycastle Provider Suddenly Stopped Working wehn I went to PDFBox 2.0

2015-07-01 Thread Andreas Lehmkühler
Hi, > Torgeir Veimo hat am 2. Juli 2015 um 05:54 > geschrieben: > > > I recently had some unexpected bouncy castle issues and didn't realise > until I read this that the 2.0.0-SNAPSHOT actually includes the bouncy > castle class files! Will the practice be abandoned for release jars? > It will

Re: Bouncycastle Provider Suddenly Stopped Working wehn I went to PDFBox 2.0

2015-07-01 Thread Torgeir Veimo
I recently had some unexpected bouncy castle issues and didn't realise until I read this that the 2.0.0-SNAPSHOT actually includes the bouncy castle class files! Will the practice be abandoned for release jars? It will definitely cause deployment issues if this practice is kept with the final 2.0.0

Re: Bouncycastle Provider Suddenly Stopped Working wehn I went to PDFBox 2.0

2015-07-01 Thread Andreas Lehmkuehler
Hi, Am 01.07.2015 um 20:27 schrieb Evan Williams: I am, as I have said before, taking a working application that used PDFBox 1.8.9 amd updating it for 2.0. I have fixed everything (with the help of the excellent people on this list) but one bug persists. I have visual signature code which is a

Bouncycastle Provider Suddenly Stopped Working wehn I went to PDFBox 2.0

2015-07-01 Thread Evan Williams
I am, as I have said before, taking a working application that used PDFBox 1.8.9 amd updating it for 2.0. I have fixed everything (with the help of the excellent people on this list) but one bug persists. I have visual signature code which is an adaptation of the Visible Signature example include

Re: Fwd: PDFRenderer : RandomAccessBuffer already closed (PDFBox 2.0)

2015-06-29 Thread Pierre Dubillot
Hi, This little advice solved my problem, thanks ! Pierre, 2015-06-27 14:28 GMT+02:00 Tilman Hausherr : > Am 26.06.2015 um 15:53 schrieb Pierre Dubillot: > >> private String pdfImgsToXml(byte[] pdfBytes) throws IOException { >> >>> >int pageNumber = 1; >>> >String imgs = "\n"; >>> >pdfSplitted =

Re: PdfBox 2.0 scale to A4 while printing document

2015-06-28 Thread John Hewson
> On 28 Jun 2015, at 11:04, Alex Sviridov wrote: > > Uff! I have finally made it to work. The following code prints with normal > margins: > > PrinterJob job = PrinterJob.getPrinterJob(); > Paper paper=new Paper(); > paper.setSize(72d*8.267d, 72d*11.692d); >

Re: PdfBox 2.0 scale to A4 while printing document

2015-06-28 Thread Tilman Hausherr
Thanks... I wonder what we'll do in the countries that don't use A4? According to wikipedia, this is North America, Bolivia, Colombia, Panama, Venezuela, the Philippines, Costa Rica, Dominican Republic, and Chile. We'd need to set up some default that will work in any country, e.g. by getting t

Re[2]: PdfBox 2.0 scale to A4 while printing document

2015-06-28 Thread Alex Sviridov
Uff! I have finally made it to work. The following code prints with normal margins:     PrinterJob job = PrinterJob.getPrinterJob();     Paper paper=new Paper();     paper.setSize(72d*8.267d, 72d*11.692d);     paper.setImageableArea(0,0,72d*8.267d, 72d*11.692d);  

Re: PdfBox 2.0 scale to A4 while printing document

2015-06-28 Thread Tilman Hausherr
Thanks, I have opened an issue in JIRA. I can confirm it, and it is only in 2.0, not on 1.8 (which doesn't help, because 1.8 doesn't render your fonts properly) https://issues.apache.org/jira/browse/PDFBOX-2844 Tilman Am 28.06.2015 um 18:01 schrieb Alex Sviridov: The file I tested is here

Re: Re[2]: PDFBox 2.0 how to print certain page

2015-06-28 Thread John Hewson
43 +02:00 от Tilman Hausherr > : >>> Am 28.06.2015 um 16:02 schrieb Александр Свиридов: >>> How can I print certain page using pdfbox 2.0? >> >> >> >> I don't do printing... I googled a bit and found this solution >> http://www.java2s.com/Code

Re[2]: PDFBox 2.0 how to print certain page

2015-06-28 Thread Alex Sviridov
um 16:02 schrieb Александр Свиридов: >> How can I print certain page using pdfbox 2.0? >> >> > > > >I don't do printing... I googled a bit and found this solution >http://www.java2s.com/Code/Java/2D-Graphics-GUI/Printingofamultipagebook.htm > >that extends

Re[2]: PdfBox 2.0 scale to A4 while printing document

2015-06-28 Thread Alex Sviridov
The file I tested is here https://yadi.sk/i/iX-KJwlhhXMY2 I printed this pdf file with Adobe Reader in mode 100%. And as expected left and right margins are about 2cm. In comparison when I print using pdfbox left margin is 4.5cm, right about 3.5cm. The code I use : PrinterJob job = PrinterJob

Re: PDFBox 2.0 how to print certain page

2015-06-28 Thread Tilman Hausherr
Am 28.06.2015 um 16:02 schrieb Александр Свиридов: How can I print certain page using pdfbox 2.0? I don't do printing... I googled a bit and found this solution http://www.java2s.com/Code/Java/2D-Graphics-GUI/Printingofamultipagebook.htm that extends Printable, and limits the pa

Re: PdfBox 2.0 scale to A4 while printing document

2015-06-28 Thread Tilman Hausherr
Hi, Something is indeed a bit tricky with your mailing software, your own comments are mixed with my comments. But I think I got them. Sorry for my "What else would you expect" comment, that was a failed attempt of being funny. I don't have LibreOffice installed, I don't know if the others d

Re[2]: PdfBox 2.0 scale to A4 while printing document

2015-06-28 Thread Александр Свиридов
Воскресенье, 28 июня 2015, 17:10 +02:00 от Tilman Hausherr : >Am 28.06.2015 um 16:43 schrieb Александр Свиридов: >> When I print pdf document it doesn't stretch to take normal A4 page area. >> I mean that margins are too big and document is smaller then it could be and >> is located in center

Re: PdfBox 2.0 scale to A4 while printing document

2015-06-28 Thread Tilman Hausherr
Am 28.06.2015 um 16:43 schrieb Александр Свиридов: When I print pdf document it doesn't stretch to take normal A4 page area. I mean that margins are too big and document is smaller then it could be and is located in center of the page. Yes it is centered. What else would you expect? Adjuste

PdfBox 2.0 scale to A4 while printing document

2015-06-28 Thread Александр Свиридов
When I print pdf document it doesn't stretch to take normal A4 page area. I mean that margins are too big and document is smaller then it could be and is located in center of the page. My code: PrinterJob job = PrinterJob.getPrinterJob(); Paper paper=new Paper(); paper.setSize(72d*8.267d, 72d*1

PdfBox 2.0 - printing using javafx printer job

2015-06-28 Thread Александр Свиридов
Is it possible to print pdf files using javafx.print.PrinterJob but not java.awt.print.PrinterJob?

PDFBox 2.0 how to print certain page

2015-06-28 Thread Александр Свиридов
How can I print certain page using pdfbox 2.0?

  1   2   >