Re: Need support in QA'ing some of the pdf reports generated

2014-11-10 Thread John Hewson
Udhay, If you’re wanting to analyse the visual appearance of a PDF then this can be quite tricky, for example you’ll have to know how to identify which content is the header and footer based on its location. PDF files are not structured like e.g. HTML, so you have to examine the low-level drawing

Re: PDFBox Alignment for Existing PDF

2014-11-11 Thread John Hewson
[ http://repository.apache.org/content/groups/snapshots/org/apache/pdfbox/pdfbox-app/2.0.0-SNAPSHOT/] but i couldnt find the silentprint method available :( Thanks, Imran On Sun, Nov 9, 2014 at 8:11 PM, John Hewson j...@jahewson.com wrote: Printing in 1.8 has a number of bugs

Re: Input data on top of images in PDFBox

2014-11-12 Thread John Hewson
Hi, Our mailing list doesn’t support attachments, so you’ll need to upload the files to a public host and share a link instead. When you say “notes” do you mean using the proper PDF “annotation” feature, or just some content which you want to insert into the PDF? -- John On 12 Nov 2014, at

Re: PDFBox Alignment for Existing PDF

2014-11-12 Thread John Hewson
2014, at 21:49, Imran Akbar imranakba...@gmail.com wrote: John, it would be great if you could provide an example implementing it. Thanks, Imran On Tue, Nov 11, 2014 at 9:15 PM, John Hewson j...@jahewson.com wrote: Sorry, I should have mentioned, we moved this functionality

Re: Page printing without barcode

2014-11-14 Thread John Hewson
Also you might want to try the 2.0 snapshot - most files render correctly with that. -- John On 14 Nov 2014, at 07:32, Tilman Hausherr thaush...@t-online.de wrote: Hi, Please retry it with the latest 1.8.8 snapshot

Re: Width information for rendered glyphs is inconsistent

2014-11-16 Thread John Hewson
Hi Vadimo This error means that the Widths in the embedded font file don’t match the widths in the FontDescriptor. You’ll need to update whichever is wrong, however PDFBox can’t edit fonts so you can only use it to update the FontDescriptor width, which may or may not be what you want. The

Re: Can we use PDFBox to render PDF

2014-11-16 Thread John Hewson
Laura, Yes, you can. As I understand it you are displaying a single PDF page in a JScrollPane but you want to display the entire PDF, so that the pages can be scrolled through, like in most PDF viewers. However, the problem is that rendering all of the images is either too slow, or uses too much

Re: PDFBox Alignment for Existing PDF

2014-11-20 Thread John Hewson
, Nov 13, 2014 at 9:28 AM, John Hewson j...@jahewson.com wrote: Yes, we could do with an example, there are multiple ways in which you can use PDFPrinter, it’s pretty flexible. For now here’s some code for simple usage: PDFPrinter printer = new PDFPrinter(document); PrinterJob job

Re: Character widths in fonts

2014-11-20 Thread John Hewson
Hi Peter, a) Paragraphs 1 and 2 use the same font, the Type 0 / CIDType2 font “ABCDEE+Calibri” but paragraph 3 uses a TrueType font with the same name. Both fonts have valid widths specified in their FontDescriptors. b) Yes, I think that it causes issues with printing, but I’ve

Re: Width information for rendered glyphs is inconsistent

2014-11-21 Thread John Hewson
}:COSArray{[COSObject{26, 0}]}) (COSName{ToUnicode}:COSDictionary{(COSName{Length}:COSInt{791}) }) } Best regards, Vadimo Am 16.11.2014 um 20:07 schrieb John Hewson j...@jahewson.com: Hi Vadimo This error means that the Widths in the embedded font file don’t match the widths

Re: Width information for rendered glyphs is inconsistent

2014-11-22 Thread John Hewson
22.11.2014 um 01:21 schrieb John Hewson j...@jahewson.com: Vadimo, Type 0 fonts are special, they are wrappers around a child font, which can be found in the first element of the DescendantFonts array. Type 0 fonts don’t have a FontDescriptor, instead it can be found in the child font. Remember

Re: How skip vertical text

2014-11-28 Thread John Hewson
Do you mean East Asian vertical text, or just rotated English, etc.? -- John On 28 Nov 2014, at 02:43, Mateusz Zakarczemny mateusz.zakarcze...@up2data.pl wrote: Hello, I would like extract text from pdf document. What is more, I want to skip text lines which are not horizontal. Does

Re: Multi-threaded PDF parsing

2014-12-02 Thread John Hewson
Hi Juan, Hello, From the FAQ about PDFBox being thread safe, it says one can have multiple threads each accessing their own PDDocument object. Yes, that’s right. I have a question about this. Here's some pseudo Scala code I use to load a document, find its children, then parse those

Re: unsubscribe the mailing list

2014-12-04 Thread John Hewson
:09 PM, John Hewson j...@jahewson.com wrote: You can unsubscribe by following the instructions at http://pdfbox.apache.org/mailinglists.html -- John On 4 Dec 2014, at 16:55, xu_rijia xu_ri...@nec.cn wrote: Hi. I want to unsubscribe the mailing list users@pdfbox.apache.org.

Re: Problem with mixed RTL/LTR pdfs

2014-12-16 Thread John Hewson
You can follow the instructions at http://pdfbox.apache.org/support.html -- John On 16 Dec 2014, at 09:31, Uri uri.har...@gmail.com wrote: Is there an issue system? Was a bug created for this? Thanks

Re: PDFMerge Exception

2014-12-16 Thread John Hewson
Try using the latest 2.0 snapshot, recursive resources are handled differently in 2.0, so the problem may not exist there. -- John On 16 Dec 2014, at 12:03, Tilman Hausherr thaush...@t-online.de wrote: Hi, Yes, you can file a bug in JIRA, but if there's really this resource recursion,

Re: help using PDFBox to print HTML PDF

2014-12-18 Thread John Hewson
PDFBox can't convert other formats to PDF. I've had success using PhantomJS in the past, so you might want to try that. Alternatively, if you're generating the HTML from XML then you could try generating FO instead and use Apache FOP to generate your PDFs. -- John On 17 Dec 2014, at 20:08,

Re: PDFBOX-2469 still have problem while decrypting a pdf file

2014-12-30 Thread John Hewson
The force flag has been removed in 2.0, so unless this is a 1.8-only issue then some other solution will be needed. We're already very forgiving to broken PDFs, so it's fine to just log a warning and skip the offending content. -- John On 30 Dec 2014, at 09:29, Thomas Chojecki

Re: JIRA performance

2015-02-04 Thread John Hewson
Yep, it’s pretty slow. -- John On 4 Feb 2015, at 10:29, Tilman Hausherr thaush...@t-online.de wrote: I've complained about that one before. They've said that they had done something, but IMHO it is worse than ever. Tilman Am 04.02.2015 um 19:26 schrieb Andrea Vacondio: Hi, I'm

Re: Release schedule 2.0.0

2015-02-03 Thread John Hewson
The short answer is that we’re getting closer now, but the process is organic. The long answer is that with regard to the APIs which I work on, we need the newer features to become stable before doing a release candidate. This is just a case of waiting a few weeks for new APIs to be used by

Re: Add jdk 8 to Travis

2015-02-05 Thread John Hewson
Good idea, I’ve now added it: https://svn.apache.org/viewvc?view=revisionrevision=1657726 https://svn.apache.org/viewvc?view=revisionrevision=1657726 Thanks. -- John On 5 Feb 2015, at 03:58, Andrea Vacondio andrea.vacon...@gmail.com wrote: I'd like to suggest to add - oraclejdk8 to the

Re: Release schedule 2.0.0

2015-02-06 Thread John Hewson
Yes, some of the PDF generating APIs are very new and new some testing, especially with regards to text. We're also missing some APIs for underlying PDF features such as transparency. -- John On 6 Feb 2015, at 03:43, Jan De Moerloose jan.demoerlo...@geosparc.com wrote: Hi Maruan, i'll

Re: Type1Glyph2D No glyph for 41 (.notdef) in font Helvetica

2015-02-03 Thread John Hewson
) at org.apache.pdfbox.tools.PDFToImage.main(PDFToImage.java:236) at org.apache.pdfbox.tools.PDFBox.main(PDFBox.java:89) -- Originalnachricht -- Von: John Hewson j...@jahewson.com mailto:j...@jahewson.com An: users@pdfbox.apache.org mailto:users@pdfbox.apache.org; Andreas Lüdtke andi.lued...@gmx.de

Re: Extract underlying PDF code from PDF file by selecting an area

2015-01-15 Thread John Hewson
that extracting content from a PDF is actually a scientific topic :D Best regards, Stefan On 2015-01-15 03:21, John Hewson wrote: Hi Stefan What you’re describing is actually fairly difficult due to the complexity of the PDF operators, we have a special processor for text in PDFBox

Re: What does appendRawCommands do?

2015-01-15 Thread John Hewson
Hi Lucy, 12 TL sets the text leading to 12pt, i.e the line-height. The default is zero. T* moves to start of a new line, and uses the TL value. This does nothing when TL is zero. The text operators are documented in full in the PDF specification (ISO 32000:1), in Section 9.3, you can find a

Re: What does appendRawCommands do?

2015-01-15 Thread John Hewson
I just realise I didn’t answer this question: Is appendRawCommands creating the bullet points? Yes, \u0095 results in a bullet point. Note that in Unicode, U+0095 is not the bullet character, but is the ASCII control character for “message waiting”. But PDFBox 1.8 does not use Unicode, it

Re: Problems building the project

2015-01-18 Thread John Hewson
On 18 Jan 2015, at 13:19, Stefan Falk s.f...@student.tugraz.at wrote: Hm, I don't get it. The requested files are already present on my system. And I can even run the JUnit tests in Eclipse for the encryption package successfully without any fails. Sounds like you have more than one JRE

Re: Runtime exception in PDFParser.parse()

2015-01-21 Thread John Hewson
You don’t have to do anything to log runtime exceptions in Java, they are passed up the stack until the process terminates and prints a stack trace. Trying to catch runtime exceptions yourself isn’t necessary or advised. Remove your exception handling code and have main() throw IOException. --

Re: merging docs with form fields and tags

2015-01-21 Thread John Hewson
You can unsubscribe at http://pdfbox.apache.org/mailinglists.html http://pdfbox.apache.org/mailinglists.html -- John On 21 Jan 2015, at 12:15, Ray Morris ray.morris.brisb...@bigpond.com wrote: I really want to be dropped from the pdfbox email list. Ray Morris

Re: Extract underlying PDF code from PDF file by selecting an area

2015-01-14 Thread John Hewson
Hi Stefan What you’re describing is actually fairly difficult due to the complexity of the PDF operators, we have a special processor for text in PDFBox, but it is not necessarily accurate. If you’re just trying to embed pages from existing PDFs into new PDFs then the SuperimposePage example

Re: Could not find or load main class

2015-01-14 Thread John Hewson
Hi Lorena, You provably need to read an introductory book on Java. These sorts of questions aren’t really suitable for the PDFBox mailing list. Or, if you’re in a hurry, try Googling the error message: https://www.google.com/#q=Could+not+find+or+load+main+class Thanks, -- John On 14 Jan

Re: Could not find or load main class

2015-01-14 Thread John Hewson
Please excuse my previous typo: ”provably — “probably -- John On 14 Jan 2015, at 09:42, John Hewson j...@jahewson.com wrote: Hi Lorena, You provably need to read an introductory book on Java. These sorts of questions aren’t really suitable for the PDFBox mailing list. Or, if you’re

Re: COSVisitorException

2015-01-14 Thread John Hewson
Hi Lorena, That error is from the Java compiler. You need to learn how to use exceptions in Java: http://docs.oracle.com/javase/tutorial/essential/exceptions/ http://docs.oracle.com/javase/tutorial/essential/exceptions/ These sorts of questions aren’t really suitable for the PDFBox mailing

Re: Error on PDDocument.load

2015-02-11 Thread John Hewson
Can we get a JIRA issue open for this, preferably with the file attached? -- John On 11 Feb 2015, at 00:29, Tilman Hausherr thaush...@t-online.de wrote: Yes, they made hacks. So did we, for many types of malformed files. Please send the file also to Andreas, unless you already did, he did

Re: Error on PDDocument.load

2015-02-11 Thread John Hewson
patch. https://issues.apache.org/jira/browse/PDFBOX-2679 Tilman Am 11.02.2015 um 18:54 schrieb Tilman Hausherr: No, his file is confidential. However we might create a non confidential file that has the same error. Tilman Am 11.02.2015 um 18:40 schrieb John Hewson: Can we get a JIRA

Re: Type1Glyph2D No glyph for 41 (.notdef) in font Helvetica

2015-01-30 Thread John Hewson
\teamviewer10.otf Gesendet: Donnerstag, 29. Januar 2015 um 18:40 Uhr Von: John Hewson j...@jahewson.com mailto:j...@jahewson.com An: users@pdfbox.apache.org mailto:users@pdfbox.apache.org Betreff: Re: Type1Glyph2D No glyph for 41 (.notdef) in font Helvetica I also have no problem rendering this PDF

Re: PDFBox on google trends

2015-01-24 Thread John Hewson
On 24 Jan 2015, at 07:09, Tilman Hausherr til...@snafu.de wrote: PDFBox on google trends: https://www.google.com/trends/explore#q=pdfbox The graphic suggests that the amount of searches is slightly declining in the long term. That’s ok, it’s following the trend for Java, just with a

Re: Problem building the project

2015-01-24 Thread John Hewson
On 24 Jan 2015, at 04:03, Stefan Falk s.f...@student.tugraz.at wrote: Hi! mvn clean install runs now through thanks to the advice of Tilman which he gave me on stackoverflow. I still don't understand why Maven does not find my JCE files. I have installed not JDK7 and set JAVA_HOME =

Re: PDF prints smaller on page than actual file

2015-01-26 Thread John Hewson
Hi, PageFormat pf = job.defaultPage(); PrinterJob#defaultPage() creates a new page, it can’t be used to modify the default, see: http://docs.oracle.com/javase/6/docs/api/java/awt/print/PrinterJob.html#defaultPage()

Re: PDFBOX as a windows Service

2015-01-11 Thread John Hewson
Hi Guy, The print(PrinterJob job) method of PDDocument calls job.printDialog() which shows the system print dialog where the user can specify custom print settings. Window services run under a non-interactive user account, rather than running as the current user. That means you won’t see the

Re: ConvertToImage generates distorted image for UTF8 character set

2015-01-11 Thread John Hewson
Hi Our mailing list doesn't support attachments - can you post the PDF online somewhere public and link to it? -- John On 11 Jan 2015, at 20:37, Sanyam Goel sanyam.g...@amdocs.com wrote: Hi, I tried to convert the first page of the attached pdf to image and got the attached resulting

Re: PDFBox drawXObject alpha channel

2015-01-08 Thread John Hewson
Yes, there’s not a built-in API for this, so you have to write the PDF commands out yourself. PDF uses an external graphics state object which you can enable with the “gs” operator: Assuming you have a PDPageContentStream named “contents”: PDExtendedGraphicsState gs1 = new

Re: String draw unicode or UTF-8

2015-01-09 Thread John Hewson
Hi Juho This isn’t supported in 1.8 but the 2.0 trunk version supports embedding TTF fonts using Unicode. Follow the instruction on our website for build from source or downloading a snapshot. Once you have 2.0, follow this example:

Re: Signature failing on some documents

2015-01-09 Thread John Hewson
Hi, Our mailing list doesn’t support attachments. Can you open a bug report on JIRA and attach your PDFs via “More Attach Files”. Please include copies of the PDF files from before and after signing. Thanks, -- John On 9 Jan 2015, at 13:27, Ruben Lagar ruben.la...@gmail.com wrote: Hello

Re: Pdfbox + Unicode

2015-01-06 Thread John Hewson
This is a known issue with 1.8 which has been fixed in the 2.0 trunk. There isn't an official release but you can use a development snapshot. -- John On 6 Jan 2015, at 14:19, t...@ainfach.de wrote: Hello, i am trying to print a € char using pdfbox. The char will end up in þÿ ¬. i

Re: How to draw duplicate data using PDFBox

2015-01-06 Thread John Hewson
Yep, what you're after is a Form XObject. Unless you have a lot of repeated content there's not much advantage to using it. -- John On 6 Jan 2015, at 13:35, Tilman Hausherr thaush...@t-online.de wrote: I was afraid that you would ask that, because I've never used it for creating, only had

Re: PDF inside PDF with PDFBox

2015-01-06 Thread John Hewson
Hi Gilles, Yes, you must first convert the EPS to PDF with a tool such as Ghostscript. You can then embed that PDF onto another PDF page by following our SuperimposePage example:

Re: PDFBox 2.0.0 and UTF8 chars

2015-03-05 Thread John Hewson
:07 PM John Hewson j...@jahewson.com wrote: Hi, On 28 Feb 2015, at 02:52, Ivan Klaric ikla...@gmail.com wrote: Hello good PDFBox people, I am working on a pet project with PDFBox and I encountered what seems to be an issue with UTF8 chars. If you take the following standard example

Re: PDFBox 2.0.0 and UTF8 chars

2015-03-05 Thread John Hewson
On 4 Mar 2015, at 14:54, Ivan Klaric ikla...@gmail.com wrote: On Wed, Mar 4, 2015 at 8:53 PM Eric Douglas edoug...@blockhouse.com wrote: I'm not sure what you're doing on the TTFParser error from the snapshot, but on copying the jars out of the lib folder make sure you get all

Re: changing font type

2015-03-07 Thread John Hewson
Which font do you want to use for that one field? Are you after a specific font or just a font size or style (e.g. sans serif?)? — John On 6 Mar 2015, at 03:17, Gilad Denneboom gilad.denneb...@gmail.com wrote: It's a bit tricky... One way of doing it would be to get the COSDictionary

Re: PDFParser Error Caused by: org.apache.pdfbox.exceptions.WrappedIOException

2015-03-07 Thread John Hewson
On 6 Mar 2015, at 12:05, ganesh.ya...@sungard.com wrote: Hello, I am getting PDFParser Error Caused by: org.apache.pdfbox.exceptions.WrappedIOException Complete stack trace is on the following link. ( http://apaste.info/DRD ) I am trying to import 4GB Long PDF using Tika into Solr. I

Re: PDFBox 2.0.0 replacement for PDPageContentStream.drawString()?

2015-03-31 Thread John Hewson
Can you provide the *full* code listing? — John On 31 Mar 2015, at 08:44, Andrew Munn and...@nmedia.net wrote: No errors or log messages, it just hangs. I do this on Linux and it works fine: File f1 = new File(/usr/share/httpd/noindex/css/fonts/Regular/OpenSans-Regular.ttf); font =

Re: pdfbox warnings

2015-03-31 Thread John Hewson
On 26 Mar 2015, at 10:41, Eric Douglas edoug...@blockhouse.com wrote: I can upload a small sample PDF that shows this error if it helps. Yes, please do. — John

Re: PDFBox 2.0.0 and UTF8 chars

2015-03-04 Thread John Hewson
Hi, On 28 Feb 2015, at 02:52, Ivan Klaric ikla...@gmail.com wrote: Hello good PDFBox people, I am working on a pet project with PDFBox and I encountered what seems to be an issue with UTF8 chars. If you take the following standard example: public static void main(String[] args) {

Re: PDFRenderer

2015-03-04 Thread John Hewson
On 4 Mar 2015, at 07:35, Eric Douglas edoug...@blockhouse.com wrote: I'm using org.apache.pdfbox.rendering.PDFRenderer renderPageToGraphics method in a GUI component. This PDFRenderer requires a document in the constructor. This render method requires the document to be open.

Re: font errors when reading PDF (not writing)

2015-02-25 Thread John Hewson
Are you running on a headless system, such as a server? If so, you probably don’t have any fonts installed. Even though you’re just doing text extraction, this matters because the dimensions of the characters need to be taken into account and many PDFs do not embed the fonts which they depend

Re: font errors when reading PDF (not writing)

2015-02-26 Thread John Hewson
) If we run pdfbox on a headless server, will the Encrypt() class still function properly? We do not render anything, just encrypt the document. My suspicion is that this is not an issue, though it would be nice to be sure. Thanks- Steve From: John

Re: How can i get the image document size?

2015-03-27 Thread John Hewson
Divide the px values by the dpi which you rendered the page at (the default is 72). inches = px / dpi Alternatively call PDPage.findCropBox() and divide the result by 72. -- John On 27 Mar 2015, at 00:30, BUSSINGER Fabien fabien.bussin...@docapost.fr wrote: Hi, I’m unable to find

Re: question about adding Chinese characters to a PDF file

2015-03-27 Thread John Hewson
Hi, Unicode doesn't work properly in 1.8. You need to use a pre-release version of PDFBox 2.0, which is available via SVN trunk, or as a SNAPSHOT jar download from our website. Check out the HelloWorldTTF example in 2.0. P.S. I've CC'd our users mailing list, please ask future questions there.

Re: convert html to pdf with pdfbox

2015-03-26 Thread John Hewson
Nope, but you can use PhantomJS. -- John On 25 Mar 2015, at 11:16, Daniel Borlean dborl...@extraview.com wrote: Does pdfbox support conversion of html files/documents to pdf format? Thanks, Daniel - To

Re: ConvertToImage generates distorted image for UTF8 character set

2015-01-13 Thread John Hewson
-Original Message- From: John Hewson [mailto:j...@jahewson.com] Sent: Monday, January 12, 2015 12:52 PM To: users@pdfbox.apache.org Subject: Re: ConvertToImage generates distorted image for UTF8 character set Hi Our mailing list doesn't support attachments - can you post the PDF online

Re: ConvertToImage generates distorted image for UTF8 character set

2015-01-13 Thread John Hewson
on the below link https://sites.google.com/site/sanyamg1988/sample-pdfs Thanks, Sanyam -Original Message- From: John Hewson [mailto:j...@jahewson.com] Sent: Monday, January 12, 2015 12:52 PM To: users@pdfbox.apache.org Subject: Re: ConvertToImage generates distorted image

Re: Windows font error

2015-04-23 Thread John Hewson
Hi, On 21 Apr 2015, at 19:49, Andrew Munn and...@nmedia.net wrote: I am adding some text to a PDF and when I open it in acrobat viewer I get two errors: An error exists on this page. Acrobat may not display the page correctly. Please contact the person who created teh PDF document to

Re: Reading text using TextPosition

2015-04-23 Thread John Hewson
On 21 Apr 2015, at 13:21, Hesham G. heshamgne...@gmail.com wrote: Frank , Thanks for explaining this. What I am trying to do is reading sentences from the PDF using TextPosition. Your explanation is clear and I can detect the new line using X Y, but what if a sentence is written

Re: extract chinese letters from pdf

2015-04-29 Thread John Hewson
On 28 Apr 2015, at 20:21, Gang Fu gangfu1...@gmail.com wrote: Hi, I want to parse the PDF file with both Chinese and English letters. Which encoding should I use? The sample file is attached. UTF-8. You want to use the trunk version of PDFBox (2.0) too. Our mailing list

Re: Custom glyph maps for a fonts

2015-04-29 Thread John Hewson
Hi Zeev, On 28 Apr 2015, at 12:50, Zeev Sands zeev.sa...@gmail.com wrote: Hello everyone, I've been using pdfbox 2.0 for a couple of weeks and came across an issue with a some symbol fonts (WPIconicSymbolsA and WPTypographicSymbols): I needed to convert the symbols to their unicode

Re: Custom glyph maps for a fonts

2015-04-30 Thread John Hewson
On 30 Apr 2015, at 05:19, Zeev Sands zeev.sa...@gmail.com wrote: On 04/29/2015 09:54 PM, John Hewson wrote: I’m not quite sure what you mean, do you mean the last-resort case where if we fail to find a mapping we simply coerce the PDF character code to Unicode? (Yes, it’s a bad idea

Re: Some Questions about PDFBox

2015-04-29 Thread John Hewson
On 29 Apr 2015, at 02:59, Alexander Miller alexander.mil...@uni-jena.de wrote: Hello, I have some question about the PDFBox. I got pdfbox 2.0.0-SNAPSHOT and if i want to use PageDrawer, it says it need PageDrawerParameters, but i can't create it, because its privat, so i can't use

Re: Custom glyph maps for a fonts

2015-04-29 Thread John Hewson
into this, by checking if unicode == null before calling super.showGlyph. — John Thank you I can see the logic now, Zeev On 04/29/2015 01:32 AM, John Hewson wrote: Hi Zeev, On 28 Apr 2015, at 12:50, Zeev Sands zeev.sa...@gmail.com wrote: Hello everyone, I've been using pdfbox 2.0

Re: buffered image to pdf in pdfbox2.0

2015-04-27 Thread John Hewson
On 27 Apr 2015, at 14:03, Tilman Hausherr thaush...@t-online.de wrote: Am 27.04.2015 um 20:08 schrieb John Hewson: On 27 Apr 2015, at 08:52, Tilman Hausherr thaush...@t-online.de wrote: PDImageXObject pdImage; if (imagePath.toLowerCase().endsWith(.jpg

Re: buffered image to pdf in pdfbox2.0

2015-04-27 Thread John Hewson
On 27 Apr 2015, at 08:52, Tilman Hausherr thaush...@t-online.de wrote: PDImageXObject pdImage; if (imagePath.toLowerCase().endsWith(.jpg)) { pdImage = JPEGFactory.createFromStream(doc, new FileInputStream(imagePath)); }

Re: Problems combining files with form fields

2015-05-06 Thread John Hewson
It’s been moved to PDFPrinter. We have a new printing API which is quite flexible. — John On 6 May 2015, at 10:15, Gilad Denneboom gilad.denneb...@gmail.com wrote: I'm noticing that in the 2.0.0 snapshot there's no print method on the PDDocument class. Has it been replaced by something

Re: PDF Printing: multiple copies

2015-05-08 Thread John Hewson
This has been fixed in 2.0: https://issues.apache.org/jira/browse/PDFBOX-2094 https://issues.apache.org/jira/browse/PDFBOX-2094 — John On 7 May 2015, at 16:04, Gregor Kovač kov...@gmail.com wrote: Hi! I'm using PDFBox 1.8.9 and using this method to print a PDF file: private static

Re: Can't resolve page number

2015-05-11 Thread John Hewson
http://pdfbox.apache.org/building.html http://pdfbox.apache.org/building.html — John On 11 May 2015, at 12:00, Noam Silver noamsil...@gmail.com wrote: Hi, It seems to be working (I probably have some bugs I need to sort out). Thanks! Where is the official repository (google gives multiple

Re: About String Replacement

2015-05-11 Thread John Hewson
What version of PDFbox are you using? We removed that functionality in 2.0 because it was fundamentally broken. The code you link to is still available in PDFBox 1.8.x, but it doesn’t work properly - if you’re lucky it will work on simple PDF files. — John On 11 May 2015, at 10:43, David Lee

Re: PDF Printing: multiple copies

2015-05-11 Thread John Hewson
ideas why I'm getting one page PDF in Java? Best regards, Kovi 2015-05-08 23:40 GMT+02:00 John Hewson j...@jahewson.com: This has been fixed in 2.0: https://issues.apache.org/jira/browse/PDFBOX-2094 https://issues.apache.org/jira/browse/PDFBOX-2094 — John On 7 May 2015, at 16

Re: Embedding an EPS

2015-05-07 Thread John Hewson
On 7 May 2015, at 09:04, phi...@free.fr wrote: I would like to generate a barcode, then embed it in the PDF. The O'Reilly 'Developing with PDF' book says that you can use XObjects to embed vectorial images (such as, perhaps, EPS). Has anyone here ever tried it? I have that book too, it

Re: PDF Printing: multiple copies

2015-05-12 Thread John Hewson
. Any ideas why I'm getting one page PDF in Java? Best regards, Kovi 2015-05-08 23:40 GMT+02:00 John Hewson j...@jahewson.com: This has been fixed in 2.0: https://issues.apache.org/jira/browse/PDFBOX-2094 https://issues.apache.org/jira/browse/PDFBOX-2094 — John On 7 May 2015

Re: PDF Printing: multiple copies

2015-05-12 Thread John Hewson
19:39 GMT+02:00 John Hewson j...@jahewson.com: That’s a shame, I can confirm that it works for me on OS X with Sun’s JDK. — John On 12 May 2015, at 06:58, Gregor Kovač kov...@gmail.com wrote: Hi! I've updates my trunk source, compiles it, used it, but it still only prints one copy

Re: PDF Printing: multiple copies

2015-05-13 Thread John Hewson
:23 GMT+02:00 John Hewson j...@jahewson.com: On 12 May 2015, at 13:17, Gregor Kovač kov...@gmail.com wrote: Hi! Hmm... How? Can you share the code you are using? I just copied and pasted the code from your e-mail. — John P.S. just in case, make sure that you’ve run: svn up

Re: PDF Printing: multiple copies

2015-05-13 Thread John Hewson
On 13 May 2015, at 01:44, Gregor Kovač kov...@gmail.com wrote: Hi! I just found out that this code does work on Windows, but not on Linux. Best regards, Kovi 2015-05-13 0:23 GMT+02:00 John Hewson j...@jahewson.com: On 12 May 2015, at 13:17, Gregor Kovač kov...@gmail.com wrote

Re: pdfbox warnings

2015-04-08 Thread John Hewson
, at 13:14, John Hewson j...@jahewson.com wrote: Ok, I think I’ve found a suitable substitute font, MS Gothic ships with Windows XP, Vista, 7, and 8 and has complete Unicode Dingbats coverage: https://www.microsoft.com/typography/fonts/font.aspx?FMID=1269 https://www.microsoft.com/typography

Re: pdfbox warnings

2015-04-07 Thread John Hewson
On 6 Apr 2015, at 14:38, Tres Finocchiaro tres.finocchi...@gmail.com wrote: ExternalFonts.addSubstitute(ZapfDingbats, WingdingsRegular); That will map Zapf Dingbats to Webdings. If it works then we can include that substitution by default in PDFBox. Just a lurker chiming in here...

Re: pdfbox warnings

2015-04-07 Thread John Hewson
(or an equivalent with a restrictive licence) cannot include them in derivative works of PDFBox. The problem would appear to arise from the PDF standard requiring a copyrighted font. P. P. On Mon, Apr 6, 2015 at 5:31 PM, John Hewson j...@jahewson.com wrote: On 6 Apr 2015, at 08:59, Eric

Re: pdfbox warnings

2015-04-06 Thread John Hewson
ArialMT for ZapfDingbats Mrz 31, 2015 11:16:49 PM org.apache.pdfbox.rendering.Type1Glyph2D getPathForCharacterCode WARNUNG: No glyph for 52 (.notdef) in font ZapfDingbats Tilman On Tue, Mar 31, 2015 at 1:42 PM, John Hewson j...@jahewson.com wrote: On 26 Mar 2015, at 10:41, Eric

Re: pdfbox warnings

2015-04-06 Thread John Hewson
to substitute it for Windings on that platform. On the Mac this isn't a problem. https://issues.apache.org/jira/browse/PDFBOX-1900 John Hewson https://issues.apache.org/jira/secure/ViewProfile.jspa?name=jahewson added a comment - 11/Feb/14 00:55 This is a PDFBox bug. Zapf Dingbats is one

Re: pdfbox warnings

2015-04-07 Thread John Hewson
On 7 Apr 2015, at 05:00, Eric Douglas edoug...@blockhouse.com wrote: On Tue, Apr 7, 2015 at 2:56 AM, John Hewson j...@jahewson.com wrote: On 6 Apr 2015, at 14:38, Tres Finocchiaro tres.finocchi...@gmail.com wrote: ExternalFonts.addSubstitute(ZapfDingbats, WingdingsRegular

Re: pdfbox warnings

2015-04-08 Thread John Hewson
always bundle your own fonts and use a custom FontProvider and PDFBox will give you consistent cross-platfrom rendering, if that’s what your project’s requirements call for, but out-of-the-box we have to provide platform-specific behaviour. — John On Tue, Apr 7, 2015 at 10:20 PM, John Hewson j

Re: pdfbox warnings

2015-04-08 Thread John Hewson
On 8 Apr 2015, at 11:22, Maruan Sahyoun sahy...@fileaffairs.de wrote: Am 08.04.2015 um 20:05 schrieb Tilman Hausherr thaush...@t-online.de: Am 08.04.2015 um 19:59 schrieb Eric Douglas: Where are you getting the Arial Unicode MS? C:\windows\fonts\ARIALUNI.TTF we might be able to

Re: pdfbox warnings

2015-04-08 Thread John Hewson
://www.fonts.com/font/microsoft-corporation/ms-gothic/regular for Dingbats coverage, click “Character Map” and select “2700…27BF Dingbats”. — John On 8 Apr 2015, at 13:07, John Hewson j...@jahewson.com wrote: On 8 Apr 2015, at 11:22, Maruan Sahyoun sahy...@fileaffairs.de mailto:sahy...@fileaffairs.de

Re: Bad quality when printing

2015-05-20 Thread John Hewson
Hi, On 20 May 2015, at 07:05, Gregor Kovač kov...@gmail.com wrote: Hi! I'm using PDFBOX 2.0 (updated subversion today) and this code to print: private static void printWithPDFBox2(File pdfFile, int copies) { PDDocument document = null; try { document =

Re: Bad quality when printing

2015-05-20 Thread John Hewson
on a physical printer. -- John Best regards, Gregor 2015-05-20 21:58 GMT+02:00 John Hewson j...@jahewson.com: Hi, On 20 May 2015, at 07:05, Gregor Kovač kov...@gmail.com wrote: Hi! I'm using PDFBOX 2.0 (updated subversion today) and this code to print: private static void

Re: Can XML file convert into pdf using pdfbox?

2015-06-08 Thread John Hewson
On 8 Jun 2015, at 00:57, mrunal lohar loha...@gmail.com wrote: Hi, Thanks for reply. I have tried with FOP but as FOP doesn't support non-BMP characters to render so I moved to pdfbox. If pdfbox doesn't allow XML to PDF conversion, Is there any other product which will allow XML to PDF

Re: PDFTextStripper question

2015-06-05 Thread John Hewson
If you’re also interested in getting the bounding boxes of individual glyphs then check out: https://github.com/apache/pdfbox/blob/trunk/examples/src/main/java/org/apache/pdfbox/examples/rendering/CustomPageDrawer.java

Re: Beginner's question....

2015-06-09 Thread John Hewson
Hi, On 9 Jun 2015, at 01:45, thierry.mat...@havells-sylvania.com wrote: Hello, I'm a french beginner either in Java and using PDFBox... I want to use PDFBox to print PDF files stored on a disk. No problem to get the PDF from disk, but my problem is to print the PDF file with correct

Re: PDFRenderer : RandomAccessBuffer already closed (PDFBox 2.0)

2015-06-25 Thread John Hewson
Just so you know, flush() or close() are both no-ops on a ByteArrayOutputStream, so there’s no need to call them. That’s not the cause of your problem, but it seemed worth mentioning. — John On 25 Jun 2015, at 09:56, Pierre Dubillot alexcou...@gmail.com wrote: I'm having an issue while

Re: Going from 1.8.9 to 2.0

2015-06-25 Thread John Hewson
. On Thu, Jun 25, 2015 at 2:16 PM, John Hewson j...@jahewson.com wrote: On 24 Jun 2015, at 13:20, Evan Williams evan.willi...@zapprx.com wrote: I have an application written to use pdfbox 1.8.9 which is all about filling forms. I have a form library and I fill in values in forms using data I

Re: PDFont.getStringWidth() throws IllegalArgumentException

2015-06-18 Thread John Hewson
On 16 Jun 2015, at 21:17, Torgeir Veimo torgeir.ve...@gmail.com wrote: Am trying out PDFBox 2.0.0-SNAPSHOT to get PDF embedding working, but am getting exceptions with normal font routines. On the string fagområder som: • skatterådgivning • regnskapsrådgivning • generasjonsskifte •

Re: PDFont.getStringWidth() throws IllegalArgumentException

2015-06-19 Thread John Hewson
exception would be clearer, e.g. MissingGlyphException? I was thinking we could still throw an IllegalArgumentException for cases where there’s a newline in the input, because that’s not supported by PDF. Thoughts? — John On 19 June 2015 at 15:07, John Hewson j...@jahewson.com wrote: On 16 Jun 2015

Re: Beginner's question....

2015-06-10 Thread John Hewson
] [attachment 352011 IS1899 SLIMRANA SUSPENDU A4R.pdf deleted by Thierry Mathey/Gennevilliers/SLIMAIL] Thierry MATHEY IT EDI Expert Havells-Sylvania thierry.mat...@havells-sylvania.com T +33 (0)1 55 51 11 64 M +33 (0)6 71 01 87 06 John Hewson ---09/06/2015 21:08:58---Hi, On 9 Jun

  1   2   3   >