[jira] [Commented] (PDFBOX-3014) ZapfDingbats not finding a substitute in Windows 8.1 Pro
[ https://issues.apache.org/jira/browse/PDFBOX-3014?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14985439#comment-14985439 ] Jason Mackin commented on PDFBOX-3014: -- In case anyone else is dealing with an Amazon Linux server, I was able to add DejaVuSans (included font with Amazon Linux server) to the substitute array for ZapfDingbats to get everything working. > ZapfDingbats not finding a substitute in Windows 8.1 Pro > > > Key: PDFBOX-3014 > URL: https://issues.apache.org/jira/browse/PDFBOX-3014 > Project: PDFBox > Issue Type: Bug > Components: Rendering >Affects Versions: 2.0.0 > Environment: Windows 8.1 Pro >Reporter: Jason Mackin >Assignee: Tilman Hausherr > Labels: easyfix > Fix For: 2.0.0 > > Attachments: az101-1.15.0.pdf > > > When running PDFBox on Windows 8.1 Pro, it can't find a proper substitute for > ZapfDingbats. > This email chain from the mailing list talks about this problem but the fix > doesn't work for me: > http://mail-archives.apache.org/mod_mbox/pdfbox-users/201504.mbox/%3ca8c49658-b378-4294-baa5-470ef822f...@jahewson.com%3E > I was able to fix this problem by adding "MS-PGothic" to the substitutes > Array for ZapfDingbats (FontMapperImpl.java). -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Commented] (PDFBOX-3014) ZapfDingbats not finding a substitute in Windows 8.1 Pro
[ https://issues.apache.org/jira/browse/PDFBOX-3014?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14984041#comment-14984041 ] Jason Mackin commented on PDFBOX-3014: -- I believe this was my fault. After reverting to an earlier version, and it working, and then updating to current version, and debugging all the way through, it still worked. I believe something was messed up in my build and/or my workspace. Sorry about the confusion. > ZapfDingbats not finding a substitute in Windows 8.1 Pro > > > Key: PDFBOX-3014 > URL: https://issues.apache.org/jira/browse/PDFBOX-3014 > Project: PDFBox > Issue Type: Bug > Components: Rendering >Affects Versions: 2.0.0 > Environment: Windows 8.1 Pro >Reporter: Jason Mackin >Assignee: Tilman Hausherr > Labels: easyfix > Fix For: 2.0.0 > > Attachments: az101-1.15.0.pdf > > > When running PDFBox on Windows 8.1 Pro, it can't find a proper substitute for > ZapfDingbats. > This email chain from the mailing list talks about this problem but the fix > doesn't work for me: > http://mail-archives.apache.org/mod_mbox/pdfbox-users/201504.mbox/%3ca8c49658-b378-4294-baa5-470ef822f...@jahewson.com%3E > I was able to fix this problem by adding "MS-PGothic" to the substitutes > Array for ZapfDingbats (FontMapperImpl.java). -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Commented] (PDFBOX-3014) ZapfDingbats not finding a substitute in Windows 8.1 Pro
[ https://issues.apache.org/jira/browse/PDFBOX-3014?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14983213#comment-14983213 ] Jason Mackin commented on PDFBOX-3014: -- I updated for the first time since this was fixed and this appears to be broken again. The same thing is happening even though your fix is still there. Standalone app breaks as well. On a side note, I started playing with Amazon EC2 and their standard Amazon Linux server only contains one font, Dejavu. Do you know where I could get a font to substitute? > ZapfDingbats not finding a substitute in Windows 8.1 Pro > > > Key: PDFBOX-3014 > URL: https://issues.apache.org/jira/browse/PDFBOX-3014 > Project: PDFBox > Issue Type: Bug > Components: Rendering >Affects Versions: 2.0.0 > Environment: Windows 8.1 Pro >Reporter: Jason Mackin >Assignee: Tilman Hausherr > Labels: easyfix > Fix For: 2.0.0 > > Attachments: az101-1.15.0.pdf > > > When running PDFBox on Windows 8.1 Pro, it can't find a proper substitute for > ZapfDingbats. > This email chain from the mailing list talks about this problem but the fix > doesn't work for me: > http://mail-archives.apache.org/mod_mbox/pdfbox-users/201504.mbox/%3ca8c49658-b378-4294-baa5-470ef822f...@jahewson.com%3E > I was able to fix this problem by adding "MS-PGothic" to the substitutes > Array for ZapfDingbats (FontMapperImpl.java). -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Commented] (PDFBOX-3014) ZapfDingbats not finding a substitute in Windows 8.1 Pro
[ https://issues.apache.org/jira/browse/PDFBOX-3014?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14957592#comment-14957592 ] Jason Mackin commented on PDFBOX-3014: -- That appears to have fixed it! I can't reproduce the problem with the webapp or with the standalone app. Thanks! > ZapfDingbats not finding a substitute in Windows 8.1 Pro > > > Key: PDFBOX-3014 > URL: https://issues.apache.org/jira/browse/PDFBOX-3014 > Project: PDFBox > Issue Type: Bug > Components: Rendering >Affects Versions: 2.0.0 > Environment: Windows 8.1 Pro >Reporter: Jason Mackin > Labels: easyfix > Attachments: az101-1.15.0.pdf > > > When running PDFBox on Windows 8.1 Pro, it can't find a proper substitute for > ZapfDingbats. > This email chain from the mailing list talks about this problem but the fix > doesn't work for me: > http://mail-archives.apache.org/mod_mbox/pdfbox-users/201504.mbox/%3ca8c49658-b378-4294-baa5-470ef822f...@jahewson.com%3E > I was able to fix this problem by adding "MS-PGothic" to the substitutes > Array for ZapfDingbats (FontMapperImpl.java). -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Comment Edited] (PDFBOX-3014) ZapfDingbats not finding a substitute in Windows 8.1 Pro
[ https://issues.apache.org/jira/browse/PDFBOX-3014?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14957265#comment-14957265 ] Jason Mackin edited comment on PDFBOX-3014 at 10/14/15 4:56 PM: Attached the pdf that fails to render check marks when flattened and using PdfRenderer to render a BufferedImage. was (Author: jasonmackin): The pdf that fails to render check marks when flattened and using PdfRenderer to render a BufferedImage. > ZapfDingbats not finding a substitute in Windows 8.1 Pro > > > Key: PDFBOX-3014 > URL: https://issues.apache.org/jira/browse/PDFBOX-3014 > Project: PDFBox > Issue Type: Bug > Components: Rendering >Affects Versions: 2.0.0 > Environment: Windows 8.1 Pro >Reporter: Jason Mackin > Labels: easyfix > Attachments: az101-1.15.0.pdf > > > When running PDFBox on Windows 8.1 Pro, it can't find a proper substitute for > ZapfDingbats. > This email chain from the mailing list talks about this problem but the fix > doesn't work for me: > http://mail-archives.apache.org/mod_mbox/pdfbox-users/201504.mbox/%3ca8c49658-b378-4294-baa5-470ef822f...@jahewson.com%3E > I was able to fix this problem by adding "MS-PGothic" to the substitutes > Array for ZapfDingbats (FontMapperImpl.java). -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Updated] (PDFBOX-3014) ZapfDingbats not finding a substitute in Windows 8.1 Pro
[ https://issues.apache.org/jira/browse/PDFBOX-3014?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason Mackin updated PDFBOX-3014: - Attachment: az101-1.15.0.pdf The pdf that fails to render check marks when flattened and using PdfRenderer to render a BufferedImage. > ZapfDingbats not finding a substitute in Windows 8.1 Pro > > > Key: PDFBOX-3014 > URL: https://issues.apache.org/jira/browse/PDFBOX-3014 > Project: PDFBox > Issue Type: Bug > Components: Rendering >Affects Versions: 2.0.0 > Environment: Windows 8.1 Pro >Reporter: Jason Mackin > Labels: easyfix > Attachments: az101-1.15.0.pdf > > > When running PDFBox on Windows 8.1 Pro, it can't find a proper substitute for > ZapfDingbats. > This email chain from the mailing list talks about this problem but the fix > doesn't work for me: > http://mail-archives.apache.org/mod_mbox/pdfbox-users/201504.mbox/%3ca8c49658-b378-4294-baa5-470ef822f...@jahewson.com%3E > I was able to fix this problem by adding "MS-PGothic" to the substitutes > Array for ZapfDingbats (FontMapperImpl.java). -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Commented] (PDFBOX-3014) ZapfDingbats not finding a substitute in Windows 8.1 Pro
[ https://issues.apache.org/jira/browse/PDFBOX-3014?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14957255#comment-14957255 ] Jason Mackin commented on PDFBOX-3014: -- I wrote a stand alone java app and it fails every time. Here is the code: {code} public static void main(String[] args) throws IOException { PDDocument document = PDDocument.load(new File("PATH_TO_FILE\\az101-1.15.0.pdf")); document.getDocumentCatalog().getAcroForm().flatten(); PDFRenderer rend = new PDFRenderer(document); BufferedImage img = rend.renderImageWithDPI(0, 175); } {code} When I debug the FontMapperImpl class in the getFont method, the line: {code} FontInfo info = fontInfoByName(postScriptName); {code} always sets info equal to null when postScriptName is "MS-Gothic" for the same reasons as in my previous post. I will attach the pdf I used to run this code. > ZapfDingbats not finding a substitute in Windows 8.1 Pro > > > Key: PDFBOX-3014 > URL: https://issues.apache.org/jira/browse/PDFBOX-3014 > Project: PDFBox > Issue Type: Bug > Components: Rendering >Affects Versions: 2.0.0 > Environment: Windows 8.1 Pro >Reporter: Jason Mackin > Labels: easyfix > > When running PDFBox on Windows 8.1 Pro, it can't find a proper substitute for > ZapfDingbats. > This email chain from the mailing list talks about this problem but the fix > doesn't work for me: > http://mail-archives.apache.org/mod_mbox/pdfbox-users/201504.mbox/%3ca8c49658-b378-4294-baa5-470ef822f...@jahewson.com%3E > I was able to fix this problem by adding "MS-PGothic" to the substitutes > Array for ZapfDingbats (FontMapperImpl.java). -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Commented] (PDFBOX-3014) ZapfDingbats not finding a substitute in Windows 8.1 Pro
[ https://issues.apache.org/jira/browse/PDFBOX-3014?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14957091#comment-14957091 ] Jason Mackin commented on PDFBOX-3014: -- I will try your suggestions today if you would still like me to but I looked through the code and debugged until I found when it is in the loadCache method in the FileSystemFontProvider class, when it is iterating through the files there is only one file for C:\windows\FONTS\msgothic.ttc. When it then converts that file into a byte[], then a ByteArrayInputStream, then an ObjectInputStream, and then calls readObject() the object returned looks like this: {code} MS-PGothic (TTF, mac: 0x0, os/2: 0x801, cid: null) C:\windows\FONTS\msgothic.ttc {code} So MS-PGothic is set in the cachedInfos List which is then used to populate the fontInfoList. The below are used to setProvider in the FontMapperImpl class, which are used to set the map fontInfoByName. When the getFont method is called in the FontMapperImpl class, it tries to get the FontInfo by looking up the postscriptName in the fontInfoByName map. Since the msgothic.ttc was set to MS-PGothic in the map, it can not find the font in the map because it is searching for MS-Gothic. It then returns null and does not make the substitution. I noticed there is no C:/windows/FONTS/MS-PGothic file in the logs even though when I navigate to that folder I see a font called MS PGothic Regular {code} DEBUG -- 2015-10-13 16:14:08,409 :: FileSystemFontProvider :: ***Found Font :file:/C:/windows/FONTS/ahronbd.ttf on the local system*** DEBUG -- 2015-10-13 16:14:08,409 :: FileSystemFontProvider :: ***Found Font :file:/C:/windows/FONTS/aldhabi.ttf on the local system*** DEBUG -- 2015-10-13 16:14:08,409 :: FileSystemFontProvider :: ***Found Font :file:/C:/windows/FONTS/andlso.ttf on the local system*** DEBUG -- 2015-10-13 16:14:08,409 :: FileSystemFontProvider :: ***Found Font :file:/C:/windows/FONTS/angsa.ttf on the local system*** DEBUG -- 2015-10-13 16:14:08,409 :: FileSystemFontProvider :: ***Found Font :file:/C:/windows/FONTS/angsab.ttf on the local system*** DEBUG -- 2015-10-13 16:14:08,409 :: FileSystemFontProvider :: ***Found Font :file:/C:/windows/FONTS/angsai.ttf on the local system*** DEBUG -- 2015-10-13 16:14:08,409 :: FileSystemFontProvider :: ***Found Font :file:/C:/windows/FONTS/angsau.ttf on the local system*** DEBUG -- 2015-10-13 16:14:08,409 :: FileSystemFontProvider :: ***Found Font :file:/C:/windows/FONTS/angsaub.ttf on the local system*** DEBUG -- 2015-10-13 16:14:08,409 :: FileSystemFontProvider :: ***Found Font :file:/C:/windows/FONTS/angsaui.ttf on the local system*** DEBUG -- 2015-10-13 16:14:08,409 :: FileSystemFontProvider :: ***Found Font :file:/C:/windows/FONTS/angsauz.ttf on the local system*** DEBUG -- 2015-10-13 16:14:08,409 :: FileSystemFontProvider :: ***Found Font :file:/C:/windows/FONTS/angsaz.ttf on the local system*** DEBUG -- 2015-10-13 16:14:08,409 :: FileSystemFontProvider :: ***Found Font :file:/C:/windows/FONTS/ANTQUAB.TTF on the local system*** DEBUG -- 2015-10-13 16:14:08,409 :: FileSystemFontProvider :: ***Found Font :file:/C:/windows/FONTS/ANTQUABI.TTF on the local system*** DEBUG -- 2015-10-13 16:14:08,409 :: FileSystemFontProvider :: ***Found Font :file:/C:/windows/FONTS/ANTQUAI.TTF on the local system*** DEBUG -- 2015-10-13 16:14:08,409 :: FileSystemFontProvider :: ***Found Font :file:/C:/windows/FONTS/aparaj.ttf on the local system*** DEBUG -- 2015-10-13 16:14:08,409 :: FileSystemFontProvider :: ***Found Font :file:/C:/windows/FONTS/aparajb.ttf on the local system*** DEBUG -- 2015-10-13 16:14:08,409 :: FileSystemFontProvider :: ***Found Font :file:/C:/windows/FONTS/aparajbi.ttf on the local system*** DEBUG -- 2015-10-13 16:14:08,409 :: FileSystemFontProvider :: ***Found Font :file:/C:/windows/FONTS/aparaji.ttf on the local system*** DEBUG -- 2015-10-13 16:14:08,409 :: FileSystemFontProvider :: ***Found Font :file:/C:/windows/FONTS/arabtype.ttf on the local system*** DEBUG -- 2015-10-13 16:14:08,409 :: FileSystemFontProvider :: ***Found Font :file:/C:/windows/FONTS/ARBERKLEY.ttf on the local system*** DEBUG -- 2015-10-13 16:14:08,409 :: FileSystemFontProvider :: ***Found Font :file:/C:/windows/FONTS/ARBLANCA.ttf on the local system*** DEBUG -- 2015-10-13 16:14:08,409 :: FileSystemFontProvider :: ***Found Font :file:/C:/windows/FONTS/ARBONNIE.ttf on the local system*** DEBUG -- 2015-10-13 16:14:08,409 :: FileSystemFontProvider :: ***Found Font :file:/C:/windows/FONTS/ARCARTER.ttf on the local system*** DEBUG -- 2015-10-13 16:14:08,409 :: FileSystemFontProvider :: ***Found Font :file:/C:/windows/FONTS/ARCENA.ttf on the local system*** DEBUG -- 2015-10-13 16:14:08,409 :: FileSystemFontProvider :: ***Found Font :file:/C:/windows/FONTS/ARCHRISTY.ttf on the local system*** DEBUG -- 2015-10-13 16:14:08,409 :: FileSystemFontProvider :: ***Found
[jira] [Commented] (PDFBOX-3014) ZapfDingbats not finding a substitute in Windows 8.1 Pro
[ https://issues.apache.org/jira/browse/PDFBOX-3014?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14955531#comment-14955531 ] Jason Mackin commented on PDFBOX-3014: -- I am now finding it hard to reproduce. I have to basically clear everything out of tomcat to get it to fail (app folder in webapps and the work folder). But here are my new results, it doesn't appear to hit the latest logging statements: {code} DEBUG -- 2015-10-13 12:49:01,508 :: FontMapperImpl :: try TTF substitute TimesNewRomanPSMT for Times-Roman DEBUG -- 2015-10-13 12:49:01,509 :: FileSystemFontProvider :: Loaded TimesNewRomanPSMT from C:\windows\FONTS\times.ttf DEBUG -- 2015-10-13 12:49:01,511 :: FontMapperImpl :: try TTF substitute TimesNewRomanPS-BoldMT for Times-Bold DEBUG -- 2015-10-13 12:49:01,512 :: FileSystemFontProvider :: Loaded TimesNewRomanPS-BoldMT from C:\windows\FONTS\timesbd.ttf DEBUG -- 2015-10-13 12:49:01,512 :: FontMapperImpl :: try TTF substitute TimesNewRomanPS-ItalicMT for Times-Italic DEBUG -- 2015-10-13 12:49:01,513 :: FileSystemFontProvider :: Loaded TimesNewRomanPS-ItalicMT from C:\windows\FONTS\timesi.ttf DEBUG -- 2015-10-13 12:49:01,513 :: FontMapperImpl :: try TTF substitute TimesNewRomanPS-BoldItalicMT for Times-BoldItalic DEBUG -- 2015-10-13 12:49:01,514 :: FileSystemFontProvider :: Loaded TimesNewRomanPS-BoldItalicMT from C:\windows\FONTS\timesbi.ttf DEBUG -- 2015-10-13 12:49:01,514 :: FontMapperImpl :: try TTF substitute ArialMT for Helvetica DEBUG -- 2015-10-13 12:49:01,515 :: FileSystemFontProvider :: Loaded ArialMT from C:\windows\FONTS\arial.ttf DEBUG -- 2015-10-13 12:49:01,516 :: FontMapperImpl :: try TTF substitute Arial-BoldMT for Helvetica-Bold DEBUG -- 2015-10-13 12:49:01,517 :: FileSystemFontProvider :: Loaded Arial-BoldMT from C:\windows\FONTS\arialbd.ttf DEBUG -- 2015-10-13 12:49:01,517 :: FontMapperImpl :: try TTF substitute Arial-ItalicMT for Helvetica-Oblique DEBUG -- 2015-10-13 12:49:01,518 :: FileSystemFontProvider :: Loaded Arial-ItalicMT from C:\windows\FONTS\ariali.ttf DEBUG -- 2015-10-13 12:49:01,518 :: FontMapperImpl :: try TTF substitute Arial-BoldItalicMT for Helvetica-BoldOblique DEBUG -- 2015-10-13 12:49:01,519 :: FileSystemFontProvider :: Loaded Arial-BoldItalicMT from C:\windows\FONTS\arialbi.ttf DEBUG -- 2015-10-13 12:49:01,519 :: FontMapperImpl :: try TTF substitute CourierNewPSMT for Courier DEBUG -- 2015-10-13 12:49:01,520 :: FileSystemFontProvider :: Loaded CourierNewPSMT from C:\windows\FONTS\cour.ttf DEBUG -- 2015-10-13 12:49:01,520 :: FontMapperImpl :: try TTF substitute CourierNewPS-BoldMT for Courier-Bold DEBUG -- 2015-10-13 12:49:01,521 :: FileSystemFontProvider :: Loaded CourierNewPS-BoldMT from C:\windows\FONTS\courbd.ttf DEBUG -- 2015-10-13 12:49:01,521 :: FontMapperImpl :: try TTF substitute CourierNewPS-ItalicMT for Courier-Oblique DEBUG -- 2015-10-13 12:49:01,522 :: FileSystemFontProvider :: Loaded CourierNewPS-ItalicMT from C:\windows\FONTS\couri.ttf DEBUG -- 2015-10-13 12:49:01,522 :: FontMapperImpl :: try TTF substitute CourierNewPS-BoldItalicMT for Courier-BoldOblique DEBUG -- 2015-10-13 12:49:01,523 :: FileSystemFontProvider :: Loaded CourierNewPS-BoldItalicMT from C:\windows\FONTS\courbi.ttf DEBUG -- 2015-10-13 12:49:01,523 :: FontMapperImpl :: try TTF substitute SymbolMT for Symbol DEBUG -- 2015-10-13 12:49:01,523 :: FileSystemFontProvider :: Loaded SymbolMT from C:\windows\FONTS\symbol.ttf DEBUG -- 2015-10-13 12:49:01,524 :: FontMapperImpl :: try TTF substitute ArialMT for Helvetica WARN -- 2015-10-13 12:49:01,526 :: PDType1Font :: Using fallback font ArialMT for base font ZapfDingbats DEBUG -- 2015-10-13 12:49:01,527 :: FontMapperImpl :: try TTF substitute ArialMT for Helvetica DEBUG -- 2015-10-13 12:49:01,531 :: FontMapperImpl :: try TTF substitute ArialMT for Helvetica DEBUG -- 2015-10-13 12:49:01,563 :: FontMapperImpl :: try TTF substitute ArialMT for Helvetica DEBUG -- 2015-10-13 12:49:01,579 :: FontMapperImpl :: try TTF substitute ArialMT for Helvetica DEBUG -- 2015-10-13 12:49:01,585 :: FontMapperImpl :: try TTF substitute ArialMT for Helvetica DEBUG -- 2015-10-13 12:49:01,586 :: FontMapperImpl :: try TTF substitute ArialMT for Helvetica DEBUG -- 2015-10-13 12:49:01,586 :: FontMapperImpl :: try TTF substitute ArialMT for Helvetica DEBUG -- 2015-10-13 12:49:01,586 :: FontMapperImpl :: try TTF substitute ArialMT for Helvetica DEBUG -- 2015-10-13 12:49:01,586 :: FontMapperImpl :: try TTF substitute ArialMT for Helvetica DEBUG -- 2015-10-13 12:49:01,586 :: FontMapperImpl :: try TTF substitute ArialMT for Helvetica DEBUG -- 2015-10-13 12:49:01,586 :: FontMapperImpl :: try TTF substitute ArialMT for Helvetica DEBUG -- 2015-10-13 12:49:01,586 :: FontMapperImpl :: try TTF substitute ArialMT for Helvetica DEBUG -- 2015-10-13 12:49:01,586 :: FontMapperImpl :: try TTF substitute ArialMT for Helvetica DEBUG -- 2015-10-13 12:49
[jira] [Commented] (PDFBOX-3014) ZapfDingbats not finding a substitute in Windows 8.1 Pro
[ https://issues.apache.org/jira/browse/PDFBOX-3014?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14955344#comment-14955344 ] Jason Mackin commented on PDFBOX-3014: -- My results: {code} DEBUG -- 2015-10-13 10:42:40,299 :: FontMapperImpl :: try TTF substitute TimesNewRomanPSMT for Times-Roman DEBUG -- 2015-10-13 10:42:40,303 :: FileSystemFontProvider :: Loaded TimesNewRomanPSMT from C:\windows\FONTS\times.ttf DEBUG -- 2015-10-13 10:42:40,303 :: FontMapperImpl :: try TTF substitute TimesNewRomanPS-BoldMT for Times-Bold DEBUG -- 2015-10-13 10:42:40,303 :: FileSystemFontProvider :: Loaded TimesNewRomanPS-BoldMT from C:\windows\FONTS\timesbd.ttf DEBUG -- 2015-10-13 10:42:40,303 :: FontMapperImpl :: try TTF substitute TimesNewRomanPS-ItalicMT for Times-Italic DEBUG -- 2015-10-13 10:42:40,303 :: FileSystemFontProvider :: Loaded TimesNewRomanPS-ItalicMT from C:\windows\FONTS\timesi.ttf DEBUG -- 2015-10-13 10:42:40,303 :: FontMapperImpl :: try TTF substitute TimesNewRomanPS-BoldItalicMT for Times-BoldItalic DEBUG -- 2015-10-13 10:42:40,303 :: FileSystemFontProvider :: Loaded TimesNewRomanPS-BoldItalicMT from C:\windows\FONTS\timesbi.ttf DEBUG -- 2015-10-13 10:42:40,303 :: FontMapperImpl :: try TTF substitute ArialMT for Helvetica DEBUG -- 2015-10-13 10:42:40,303 :: FileSystemFontProvider :: Loaded ArialMT from C:\windows\FONTS\arial.ttf DEBUG -- 2015-10-13 10:42:40,303 :: FontMapperImpl :: try TTF substitute Arial-BoldMT for Helvetica-Bold DEBUG -- 2015-10-13 10:42:40,303 :: FileSystemFontProvider :: Loaded Arial-BoldMT from C:\windows\FONTS\arialbd.ttf DEBUG -- 2015-10-13 10:42:40,303 :: FontMapperImpl :: try TTF substitute Arial-ItalicMT for Helvetica-Oblique DEBUG -- 2015-10-13 10:42:40,303 :: FileSystemFontProvider :: Loaded Arial-ItalicMT from C:\windows\FONTS\ariali.ttf DEBUG -- 2015-10-13 10:42:40,303 :: FontMapperImpl :: try TTF substitute Arial-BoldItalicMT for Helvetica-BoldOblique DEBUG -- 2015-10-13 10:42:40,303 :: FileSystemFontProvider :: Loaded Arial-BoldItalicMT from C:\windows\FONTS\arialbi.ttf DEBUG -- 2015-10-13 10:42:40,303 :: FontMapperImpl :: try TTF substitute CourierNewPSMT for Courier DEBUG -- 2015-10-13 10:42:40,303 :: FileSystemFontProvider :: Loaded CourierNewPSMT from C:\windows\FONTS\cour.ttf DEBUG -- 2015-10-13 10:42:40,303 :: FontMapperImpl :: try TTF substitute CourierNewPS-BoldMT for Courier-Bold DEBUG -- 2015-10-13 10:42:40,303 :: FileSystemFontProvider :: Loaded CourierNewPS-BoldMT from C:\windows\FONTS\courbd.ttf DEBUG -- 2015-10-13 10:42:40,303 :: FontMapperImpl :: try TTF substitute CourierNewPS-ItalicMT for Courier-Oblique DEBUG -- 2015-10-13 10:42:40,318 :: FileSystemFontProvider :: Loaded CourierNewPS-ItalicMT from C:\windows\FONTS\couri.ttf DEBUG -- 2015-10-13 10:42:40,318 :: FontMapperImpl :: try TTF substitute CourierNewPS-BoldItalicMT for Courier-BoldOblique DEBUG -- 2015-10-13 10:42:40,318 :: FileSystemFontProvider :: Loaded CourierNewPS-BoldItalicMT from C:\windows\FONTS\courbi.ttf DEBUG -- 2015-10-13 10:42:40,318 :: FontMapperImpl :: try TTF substitute SymbolMT for Symbol DEBUG -- 2015-10-13 10:42:40,318 :: FileSystemFontProvider :: Loaded SymbolMT from C:\windows\FONTS\symbol.ttf DEBUG -- 2015-10-13 10:42:40,318 :: FontMapperImpl :: try TTF substitute ArialMT for Helvetica WARN -- 2015-10-13 10:42:40,318 :: PDType1Font :: Using fallback font ArialMT for base font ZapfDingbats DEBUG -- 2015-10-13 10:42:40,318 :: FontMapperImpl :: try TTF substitute ArialMT for Helvetica DEBUG -- 2015-10-13 10:42:40,318 :: FontMapperImpl :: try TTF substitute ArialMT for Helvetica DEBUG -- 2015-10-13 10:42:40,365 :: FontMapperImpl :: try TTF substitute ArialMT for Helvetica DEBUG -- 2015-10-13 10:42:40,365 :: FontMapperImpl :: try TTF substitute ArialMT for Helvetica DEBUG -- 2015-10-13 10:42:40,365 :: FontMapperImpl :: try TTF substitute ArialMT for Helvetica DEBUG -- 2015-10-13 10:42:40,365 :: FontMapperImpl :: try TTF substitute ArialMT for Helvetica DEBUG -- 2015-10-13 10:42:40,381 :: FontMapperImpl :: try TTF substitute ArialMT for Helvetica DEBUG -- 2015-10-13 10:42:40,381 :: FontMapperImpl :: try TTF substitute ArialMT for Helvetica DEBUG -- 2015-10-13 10:42:40,381 :: FontMapperImpl :: try TTF substitute ArialMT for Helvetica DEBUG -- 2015-10-13 10:42:40,381 :: FontMapperImpl :: try TTF substitute ArialMT for Helvetica DEBUG -- 2015-10-13 10:42:40,381 :: FontMapperImpl :: try TTF substitute ArialMT for Helvetica DEBUG -- 2015-10-13 10:42:40,381 :: FontMapperImpl :: try TTF substitute ArialMT for Helvetica DEBUG -- 2015-10-13 10:42:40,381 :: FontMapperImpl :: try TTF substitute ArialMT for Helvetica DEBUG -- 2015-10-13 10:42:40,381 :: FontMapperImpl :: try TTF substitute ArialMT for Helvetica DEBUG -- 2015-10-13 10:42:40,381 :: FontMapperImpl :: try TTF substitute ArialMT for Helvetica DEBUG -- 2015-10-13 10:42:40,381 :: FontMapperImpl :: try TTF su
[jira] [Commented] (PDFBOX-3014) ZapfDingbats not finding a substitute in Windows 8.1 Pro
[ https://issues.apache.org/jira/browse/PDFBOX-3014?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14953413#comment-14953413 ] Jason Mackin commented on PDFBOX-3014: -- The results from the code are: [MS-Gothic, MS-UIGothic, MS-PGothic] Here is the logs when I have not added any new substitutes (and the checkmarks do not show up): DEBUG -- 2015-10-12 10:06:12,297 :: FileSystemFontProvider :: Loaded TimesNewRomanPSMT from C:\windows\FONTS\times.ttf DEBUG -- 2015-10-12 10:06:12,299 :: FileSystemFontProvider :: Loaded TimesNewRomanPS-BoldMT from C:\windows\FONTS\timesbd.ttf DEBUG -- 2015-10-12 10:06:12,299 :: FileSystemFontProvider :: Loaded TimesNewRomanPS-ItalicMT from C:\windows\FONTS\timesi.ttf DEBUG -- 2015-10-12 10:06:12,299 :: FileSystemFontProvider :: Loaded TimesNewRomanPS-BoldItalicMT from C:\windows\FONTS\timesbi.ttf DEBUG -- 2015-10-12 10:06:12,303 :: FileSystemFontProvider :: Loaded ArialMT from C:\windows\FONTS\arial.ttf DEBUG -- 2015-10-12 10:06:12,303 :: FileSystemFontProvider :: Loaded Arial-BoldMT from C:\windows\FONTS\arialbd.ttf DEBUG -- 2015-10-12 10:06:12,303 :: FileSystemFontProvider :: Loaded Arial-ItalicMT from C:\windows\FONTS\ariali.ttf DEBUG -- 2015-10-12 10:06:12,303 :: FileSystemFontProvider :: Loaded Arial-BoldItalicMT from C:\windows\FONTS\arialbi.ttf DEBUG -- 2015-10-12 10:06:12,307 :: FileSystemFontProvider :: Loaded CourierNewPSMT from C:\windows\FONTS\cour.ttf DEBUG -- 2015-10-12 10:06:12,307 :: FileSystemFontProvider :: Loaded CourierNewPS-BoldMT from C:\windows\FONTS\courbd.ttf DEBUG -- 2015-10-12 10:06:12,307 :: FileSystemFontProvider :: Loaded CourierNewPS-ItalicMT from C:\windows\FONTS\couri.ttf DEBUG -- 2015-10-12 10:06:12,307 :: FileSystemFontProvider :: Loaded CourierNewPS-BoldItalicMT from C:\windows\FONTS\courbi.ttf DEBUG -- 2015-10-12 10:06:12,307 :: FileSystemFontProvider :: Loaded SymbolMT from C:\windows\FONTS\symbol.ttf WARN -- 2015-10-12 10:06:12,311 :: PDType1Font :: Using fallback font ArialMT for base font ZapfDingbats WARN -- 2015-10-12 10:06:13,371 :: PDType0Font :: No Unicode mapping for CID+133 (133) in font LKPPFM+Wingdings-Regular WARN -- 2015-10-12 10:06:13,400 :: PDType0Font :: No Unicode mapping for CID+133 (133) in font LKPPFM+Wingdings-Regular WARN -- 2015-10-12 10:06:13,408 :: PDType0Font :: No Unicode mapping for CID+133 (133) in font LKPPFM+Wingdings-Regular WARN -- 2015-10-12 10:06:13,412 :: PDType0Font :: No Unicode mapping for CID+133 (133) in font LKPPFM+Wingdings-Regular WARN -- 2015-10-12 10:06:13,412 :: PDType0Font :: No Unicode mapping for CID+133 (133) in font LKPPFM+Wingdings-Regular WARN -- 2015-10-12 10:06:13,416 :: PDType0Font :: No Unicode mapping for CID+133 (133) in font LKPPFM+Wingdings-Regular WARN -- 2015-10-12 10:06:13,416 :: PDType0Font :: No Unicode mapping for CID+133 (133) in font LKPPFM+Wingdings-Regular WARN -- 2015-10-12 10:06:13,420 :: PDType0Font :: No Unicode mapping for CID+133 (133) in font LKPPFM+Wingdings-Regular WARN -- 2015-10-12 10:06:13,424 :: PDType0Font :: No Unicode mapping for CID+133 (133) in font LKPPFM+Wingdings-Regular WARN -- 2015-10-12 10:06:13,436 :: PDType0Font :: No Unicode mapping for CID+133 (133) in font LKPPFM+Wingdings-Regular WARN -- 2015-10-12 10:06:13,772 :: PDType1Font :: Using fallback font ArialMT for ZapfDingbats WARN -- 2015-10-12 10:06:13,772 :: Type1Glyph2D :: No glyph for 52 (a20) in font ZapfDingbats WARN -- 2015-10-12 10:06:13,772 :: PDType1Font :: Using fallback font ArialMT for ZapfDingbats WARN -- 2015-10-12 10:06:13,776 :: Type1Glyph2D :: No glyph for 52 (a20) in font ZapfDingbats WARN -- 2015-10-12 10:06:13,780 :: PDType1Font :: Using fallback font ArialMT for ZapfDingbats WARN -- 2015-10-12 10:06:13,780 :: Type1Glyph2D :: No glyph for 52 (a20) in font ZapfDingbats > ZapfDingbats not finding a substitute in Windows 8.1 Pro > > > Key: PDFBOX-3014 > URL: https://issues.apache.org/jira/browse/PDFBOX-3014 > Project: PDFBox > Issue Type: Bug > Components: Rendering >Affects Versions: 2.0.0 > Environment: Windows 8.1 Pro >Reporter: Jason Mackin > Labels: easyfix > > When running PDFBox on Windows 8.1 Pro, it can't find a proper substitute for > ZapfDingbats. > This email chain from the mailing list talks about this problem but the fix > doesn't work for me: > http://mail-archives.apache.org/mod_mbox/pdfbox-users/201504.mbox/%3ca8c49658-b378-4294-baa5-470ef822f...@jahewson.com%3E > I was able to fix this problem by adding "MS-PGothic" to the substitutes > Array for ZapfDingbats (FontMapperImpl.java). -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.or
[jira] [Updated] (PDFBOX-3015) PDICCBased loadICCProfile() throwing ConcurrentModificationException
[ https://issues.apache.org/jira/browse/PDFBOX-3015?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason Mackin updated PDFBOX-3015: - Description: When running a load test using PDFRenderer's method renderImageWithDPI(pageIndex, 175), I am receiving a ConcurrentModificationException. I only receive this using Java 6-8 and Tomcat 6 or 7 but Tomcat 8 seems to work. I can reproduce this with as little as 4 concurrent threads kicked off at the same time. It only happens the first time the method is called (server startup), after that it works fine. Here is the stacktrace: {quote} java.util.ConcurrentModificationException at java.util.Vector$Itr.checkForComodification(Vector.java:1156) at java.util.Vector$Itr.next(Vector.java:1133) at sun.java2d.cmm.ProfileDeferralMgr.activateProfiles(ProfileDeferralMgr.java:93) at java.awt.color.ICC_Profile.getInstance(ICC_Profile.java:775) at java.awt.color.ICC_Profile.getInstance(ICC_Profile.java:1013) at org.apache.pdfbox.pdmodel.graphics.color.PDICCBased.loadICCProfile(PDICCBased.java:119) at org.apache.pdfbox.pdmodel.graphics.color.PDICCBased.(PDICCBased.java:89) at org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace.create(PDColorSpace.java:162) at org.apache.pdfbox.pdmodel.PDResources.getColorSpace(PDResources.java:155) at org.apache.pdfbox.contentstream.operator.color.SetStrokingColorSpace.process(SetStrokingColorSpace.java:41) at org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:799) at org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:461) at org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:438) at org.apache.pdfbox.contentstream.PDFStreamEngine.processPage(PDFStreamEngine.java:149) at org.apache.pdfbox.rendering.PageDrawer.drawPage(PageDrawer.java:180) at org.apache.pdfbox.rendering.PDFRenderer.renderPage(PDFRenderer.java:208) at org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:139) at org.apache.pdfbox.rendering.PDFRenderer.renderImageWithDPI(PDFRenderer.java:80) {quote} Since the problem was with a java class not being synchronized, I added a simple static synchronized method to PDICCBased.java to load the profile and prevent the race condition: {quote} private static synchronized ICC_Profile getICCProfile(InputStream input) throws IOException \{ return ICC_Profile.getInstance(input); \} {quote} And call it from the loadICCProfile method: {quote} ICC_Profile profile = PDICCBased.getICCProfile(input); {quote} was: When running a load test using PDFRenderer's method renderImageWithDPI(pageIndex, 175), I am receiving a ConcurrentModificationException. I only receive this using Java 6-8 and Tomcat 6 or 7, 8 seems to work fine. I can reproduce this with as little as 4 concurrent threads kicked off at the same time. It only happens the first time the method is called (server startup), after that it works fine. Here is the stacktrace: {quote} java.util.ConcurrentModificationException at java.util.Vector$Itr.checkForComodification(Vector.java:1156) at java.util.Vector$Itr.next(Vector.java:1133) at sun.java2d.cmm.ProfileDeferralMgr.activateProfiles(ProfileDeferralMgr.java:93) at java.awt.color.ICC_Profile.getInstance(ICC_Profile.java:775) at java.awt.color.ICC_Profile.getInstance(ICC_Profile.java:1013) at org.apache.pdfbox.pdmodel.graphics.color.PDICCBased.loadICCProfile(PDICCBased.java:119) at org.apache.pdfbox.pdmodel.graphics.color.PDICCBased.(PDICCBased.java:89) at org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace.create(PDColorSpace.java:162) at org.apache.pdfbox.pdmodel.PDResources.getColorSpace(PDResources.java:155) at org.apache.pdfbox.contentstream.operator.color.SetStrokingColorSpace.process(SetStrokingColorSpace.java:41) at org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:799) at org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:461) at org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:438) at org.apache.pdfbox.contentstream.PDFStreamEngine.processPage(PDFStreamEngine.java:149) at org.apache.pdfbox.rendering.PageDrawer.drawPage(PageDrawer.java:180) at org.apache.pdfbox.rendering.PDFRenderer.renderPage(PDFRenderer.java:208) at org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:139) at org.apache.pdfbox.rendering.PDFRenderer.renderImageWithDPI(PDFRenderer.java:80) {quote} Since the problem was with a java class not being synchronized, I added a simple static synchronized method to
[jira] [Created] (PDFBOX-3015) PDICCBased loadICCProfile() throwing ConcurrentModificationException
Jason Mackin created PDFBOX-3015: Summary: PDICCBased loadICCProfile() throwing ConcurrentModificationException Key: PDFBOX-3015 URL: https://issues.apache.org/jira/browse/PDFBOX-3015 Project: PDFBox Issue Type: Bug Components: Rendering Affects Versions: 2.0.0 Environment: Windows 8.1 Pro java 6-8 tomcat 6-7 Reporter: Jason Mackin When running a load test using PDFRenderer's method renderImageWithDPI(pageIndex, 175), I am receiving a ConcurrentModificationException. I only receive this using Java 6-8 and Tomcat 6 or 7, 8 seems to work fine. I can reproduce this with as little as 4 concurrent threads kicked off at the same time. It only happens the first time the method is called (server startup), after that it works fine. Here is the stacktrace: {quote} java.util.ConcurrentModificationException at java.util.Vector$Itr.checkForComodification(Vector.java:1156) at java.util.Vector$Itr.next(Vector.java:1133) at sun.java2d.cmm.ProfileDeferralMgr.activateProfiles(ProfileDeferralMgr.java:93) at java.awt.color.ICC_Profile.getInstance(ICC_Profile.java:775) at java.awt.color.ICC_Profile.getInstance(ICC_Profile.java:1013) at org.apache.pdfbox.pdmodel.graphics.color.PDICCBased.loadICCProfile(PDICCBased.java:119) at org.apache.pdfbox.pdmodel.graphics.color.PDICCBased.(PDICCBased.java:89) at org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace.create(PDColorSpace.java:162) at org.apache.pdfbox.pdmodel.PDResources.getColorSpace(PDResources.java:155) at org.apache.pdfbox.contentstream.operator.color.SetStrokingColorSpace.process(SetStrokingColorSpace.java:41) at org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:799) at org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:461) at org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:438) at org.apache.pdfbox.contentstream.PDFStreamEngine.processPage(PDFStreamEngine.java:149) at org.apache.pdfbox.rendering.PageDrawer.drawPage(PageDrawer.java:180) at org.apache.pdfbox.rendering.PDFRenderer.renderPage(PDFRenderer.java:208) at org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:139) at org.apache.pdfbox.rendering.PDFRenderer.renderImageWithDPI(PDFRenderer.java:80) {quote} Since the problem was with a java class not being synchronized, I added a simple static synchronized method to PDICCBased.java to load the profile and prevent the race condition: {quote} private static synchronized ICC_Profile getICCProfile(InputStream input) throws IOException \{ return ICC_Profile.getInstance(input); \} {quote} And call it from the loadICCProfile method: {quote} ICC_Profile profile = PDICCBased.getICCProfile(input); {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Commented] (PDFBOX-3012) PDAcroForm flatten() throws ClassCastException
[ https://issues.apache.org/jira/browse/PDFBOX-3012?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14950610#comment-14950610 ] Jason Mackin commented on PDFBOX-3012: -- Yes, that prevented the Exeception. Thanks! > PDAcroForm flatten() throws ClassCastException > -- > > Key: PDFBOX-3012 > URL: https://issues.apache.org/jira/browse/PDFBOX-3012 > Project: PDFBox > Issue Type: Bug > Components: AcroForm >Affects Versions: 2.0.0 >Reporter: Jason Mackin >Assignee: Maruan Sahyoun > Labels: easyfix > Fix For: 2.0.0 > > Attachments: az101-1.15.0.pdf > > > In the PDAcroForm class, in the flatten() method, there is a for loop that > tries casting field to a PDTerminalField. But, the field is sometimes a > PDNonTerminalField and the casting error is thrown. > To fix this I just add one if statement right before the for loop that checks > to see if field is an instance of PDTerminalField and place the for loop > inside the if statement: > if(field instanceof PDTerminalField){ -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Created] (PDFBOX-3014) ZapfDingbats not finding a substitute in Windows 8.1 Pro
Jason Mackin created PDFBOX-3014: Summary: ZapfDingbats not finding a substitute in Windows 8.1 Pro Key: PDFBOX-3014 URL: https://issues.apache.org/jira/browse/PDFBOX-3014 Project: PDFBox Issue Type: Bug Components: Rendering Affects Versions: 2.0.0 Environment: Windows 8.1 Pro Reporter: Jason Mackin When running PDFBox on Windows 8.1 Pro, it can't find a proper substitute for ZapfDingbats. This email chain from the mailing list talks about this problem but the fix doesn't work for me: http://mail-archives.apache.org/mod_mbox/pdfbox-users/201504.mbox/%3ca8c49658-b378-4294-baa5-470ef822f...@jahewson.com%3E I was able to fix this problem by adding "MS-PGothic" to the substitutes Array for ZapfDingbats (FontMapperImpl.java). -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Updated] (PDFBOX-3012) PDAcroForm flatten() throws ClassCastException
[ https://issues.apache.org/jira/browse/PDFBOX-3012?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason Mackin updated PDFBOX-3012: - Description: In the PDAcroForm class, in the flatten() method, there is a for loop that tries casting field to a PDTerminalField. But, the field is sometimes a PDNonTerminalField and the casting error is thrown. To fix this I just add one if statement right before the for loop that checks to see if field is an instance of PDTerminalField and place the for loop inside the if statement: if(field instanceof PDTerminalField){ was: In the PDAcroForm class, in the flatten() method, there is a for loop that tries casting field to a PDTerminalField. the field is sometimes a PDNonTerminalField and the casting error is thrown. To fix this I just add one if statement right before the for loop that checks to see if field is an instance of PDTerminalField and place the for loop inside the if statement: if(field instanceof PDTerminalField){ > PDAcroForm flatten() throws ClassCastException > -- > > Key: PDFBOX-3012 > URL: https://issues.apache.org/jira/browse/PDFBOX-3012 > Project: PDFBox > Issue Type: Bug > Components: AcroForm >Affects Versions: 2.0.0 >Reporter: Jason Mackin > Labels: easyfix > Attachments: az101-1.15.0.pdf > > > In the PDAcroForm class, in the flatten() method, there is a for loop that > tries casting field to a PDTerminalField. But, the field is sometimes a > PDNonTerminalField and the casting error is thrown. > To fix this I just add one if statement right before the for loop that checks > to see if field is an instance of PDTerminalField and place the for loop > inside the if statement: > if(field instanceof PDTerminalField){ -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Updated] (PDFBOX-3012) PDAcroForm flatten() throws ClassCastException
[ https://issues.apache.org/jira/browse/PDFBOX-3012?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason Mackin updated PDFBOX-3012: - Attachment: az101-1.15.0.pdf > PDAcroForm flatten() throws ClassCastException > -- > > Key: PDFBOX-3012 > URL: https://issues.apache.org/jira/browse/PDFBOX-3012 > Project: PDFBox > Issue Type: Bug > Components: AcroForm >Affects Versions: 2.0.0 >Reporter: Jason Mackin > Labels: easyfix > Attachments: az101-1.15.0.pdf > > > In the PDAcroForm class, in the flatten() method, there is a for loop that > tries casting field to a PDTerminalField. the field is sometimes a > PDNonTerminalField and the casting error is thrown. > To fix this I just add one if statement right before the for loop that checks > to see if field is an instance of PDTerminalField and place the for loop > inside the if statement: > if(field instanceof PDTerminalField){ -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Created] (PDFBOX-3012) PDAcroForm flatten() throws ClassCastException
Jason Mackin created PDFBOX-3012: Summary: PDAcroForm flatten() throws ClassCastException Key: PDFBOX-3012 URL: https://issues.apache.org/jira/browse/PDFBOX-3012 Project: PDFBox Issue Type: Bug Components: AcroForm Affects Versions: 2.0.0 Reporter: Jason Mackin In the PDAcroForm class, in the flatten() method, there is a for loop that tries casting field to a PDTerminalField. the field is sometimes a PDNonTerminalField and the casting error is thrown. To fix this I just add one if statement right before the for loop that checks to see if field is an instance of PDTerminalField and place the for loop inside the if statement: if(field instanceof PDTerminalField){ -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Updated] (PDFBOX-2761) Casting error for PDRadioButton when trying to exportFDF
[ https://issues.apache.org/jira/browse/PDFBOX-2761?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason Mackin updated PDFBOX-2761: - Attachment: az101-1.15.0.pdf This Form throws: org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationWidget cannot be cast to org.apache.pdfbox.pdmodel.interactive.form.PDFieldTreeNode > Casting error for PDRadioButton when trying to exportFDF > > > Key: PDFBOX-2761 > URL: https://issues.apache.org/jira/browse/PDFBOX-2761 > Project: PDFBox > Issue Type: Bug > Components: AcroForm >Affects Versions: 2.0.0 >Reporter: Jason Mackin > Attachments: az101-1.15.0.pdf > > > When trying to exportFDF() in PDAcroForm.java, there is a ClassCastException > thrown when addFieldAndChilden(PDFieldTreeNode docField, List > fdfFields) is called and the docField is a PDRadioButton that has kids and > one is a PDWidget. > PDRadioButton.getKids() says: > "This will get all the kids of this field. The values in the list will either > be PDWidget or PDField. Normally they will be PDWidget objects unless this is > a non-terminal field and they will be child PDField objects." > But when kids are returned in the addFieldAndChilden method and one is a > PDWidget (PDAnnotationWidget in my case), it tries to cast it as a > PDFieldTreeNode and throws the exception. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Issue Comment Deleted] (PDFBOX-2761) Casting error for PDRadioButton when trying to exportFDF
[ https://issues.apache.org/jira/browse/PDFBOX-2761?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason Mackin updated PDFBOX-2761: - Comment: was deleted (was: This Form throws: org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationWidget cannot be cast to org.apache.pdfbox.pdmodel.interactive.form.PDFieldTreeNode) > Casting error for PDRadioButton when trying to exportFDF > > > Key: PDFBOX-2761 > URL: https://issues.apache.org/jira/browse/PDFBOX-2761 > Project: PDFBox > Issue Type: Bug > Components: AcroForm >Affects Versions: 2.0.0 >Reporter: Jason Mackin > > When trying to exportFDF() in PDAcroForm.java, there is a ClassCastException > thrown when addFieldAndChilden(PDFieldTreeNode docField, List > fdfFields) is called and the docField is a PDRadioButton that has kids and > one is a PDWidget. > PDRadioButton.getKids() says: > "This will get all the kids of this field. The values in the list will either > be PDWidget or PDField. Normally they will be PDWidget objects unless this is > a non-terminal field and they will be child PDField objects." > But when kids are returned in the addFieldAndChilden method and one is a > PDWidget (PDAnnotationWidget in my case), it tries to cast it as a > PDFieldTreeNode and throws the exception. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Updated] (PDFBOX-2761) Casting error for PDRadioButton when trying to exportFDF
[ https://issues.apache.org/jira/browse/PDFBOX-2761?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason Mackin updated PDFBOX-2761: - Attachment: (was: az101-1.15.0_withholding-form-info.json) > Casting error for PDRadioButton when trying to exportFDF > > > Key: PDFBOX-2761 > URL: https://issues.apache.org/jira/browse/PDFBOX-2761 > Project: PDFBox > Issue Type: Bug > Components: AcroForm >Affects Versions: 2.0.0 >Reporter: Jason Mackin > > When trying to exportFDF() in PDAcroForm.java, there is a ClassCastException > thrown when addFieldAndChilden(PDFieldTreeNode docField, List > fdfFields) is called and the docField is a PDRadioButton that has kids and > one is a PDWidget. > PDRadioButton.getKids() says: > "This will get all the kids of this field. The values in the list will either > be PDWidget or PDField. Normally they will be PDWidget objects unless this is > a non-terminal field and they will be child PDField objects." > But when kids are returned in the addFieldAndChilden method and one is a > PDWidget (PDAnnotationWidget in my case), it tries to cast it as a > PDFieldTreeNode and throws the exception. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Commented] (PDFBOX-2761) Casting error for PDRadioButton when trying to exportFDF
[ https://issues.apache.org/jira/browse/PDFBOX-2761?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14500040#comment-14500040 ] Jason Mackin commented on PDFBOX-2761: -- I am not sure if this related, but the problem sounds similiar to https://issues.apache.org/jira/browse/PDFBOX-50. > Casting error for PDRadioButton when trying to exportFDF > > > Key: PDFBOX-2761 > URL: https://issues.apache.org/jira/browse/PDFBOX-2761 > Project: PDFBox > Issue Type: Bug > Components: AcroForm >Affects Versions: 2.0.0 >Reporter: Jason Mackin > Attachments: az101-1.15.0_withholding-form-info.json > > > When trying to exportFDF() in PDAcroForm.java, there is a ClassCastException > thrown when addFieldAndChilden(PDFieldTreeNode docField, List > fdfFields) is called and the docField is a PDRadioButton that has kids and > one is a PDWidget. > PDRadioButton.getKids() says: > "This will get all the kids of this field. The values in the list will either > be PDWidget or PDField. Normally they will be PDWidget objects unless this is > a non-terminal field and they will be child PDField objects." > But when kids are returned in the addFieldAndChilden method and one is a > PDWidget (PDAnnotationWidget in my case), it tries to cast it as a > PDFieldTreeNode and throws the exception. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Comment Edited] (PDFBOX-2761) Casting error for PDRadioButton when trying to exportFDF
[ https://issues.apache.org/jira/browse/PDFBOX-2761?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14500040#comment-14500040 ] Jason Mackin edited comment on PDFBOX-2761 at 4/17/15 3:34 PM: --- I am not sure if this is related, but the problem sounds similiar to https://issues.apache.org/jira/browse/PDFBOX-50. was (Author: jasonmackin): I am not sure if this related, but the problem sounds similiar to https://issues.apache.org/jira/browse/PDFBOX-50. > Casting error for PDRadioButton when trying to exportFDF > > > Key: PDFBOX-2761 > URL: https://issues.apache.org/jira/browse/PDFBOX-2761 > Project: PDFBox > Issue Type: Bug > Components: AcroForm >Affects Versions: 2.0.0 >Reporter: Jason Mackin > Attachments: az101-1.15.0_withholding-form-info.json > > > When trying to exportFDF() in PDAcroForm.java, there is a ClassCastException > thrown when addFieldAndChilden(PDFieldTreeNode docField, List > fdfFields) is called and the docField is a PDRadioButton that has kids and > one is a PDWidget. > PDRadioButton.getKids() says: > "This will get all the kids of this field. The values in the list will either > be PDWidget or PDField. Normally they will be PDWidget objects unless this is > a non-terminal field and they will be child PDField objects." > But when kids are returned in the addFieldAndChilden method and one is a > PDWidget (PDAnnotationWidget in my case), it tries to cast it as a > PDFieldTreeNode and throws the exception. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Updated] (PDFBOX-2761) Casting error for PDRadioButton when trying to exportFDF
[ https://issues.apache.org/jira/browse/PDFBOX-2761?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason Mackin updated PDFBOX-2761: - Attachment: az101-1.15.0_withholding-form-info.json This Form throws: org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationWidget cannot be cast to org.apache.pdfbox.pdmodel.interactive.form.PDFieldTreeNode > Casting error for PDRadioButton when trying to exportFDF > > > Key: PDFBOX-2761 > URL: https://issues.apache.org/jira/browse/PDFBOX-2761 > Project: PDFBox > Issue Type: Bug > Components: AcroForm >Affects Versions: 2.0.0 >Reporter: Jason Mackin > Attachments: az101-1.15.0_withholding-form-info.json > > > When trying to exportFDF() in PDAcroForm.java, there is a ClassCastException > thrown when addFieldAndChilden(PDFieldTreeNode docField, List > fdfFields) is called and the docField is a PDRadioButton that has kids and > one is a PDWidget. > PDRadioButton.getKids() says: > "This will get all the kids of this field. The values in the list will either > be PDWidget or PDField. Normally they will be PDWidget objects unless this is > a non-terminal field and they will be child PDField objects." > But when kids are returned in the addFieldAndChilden method and one is a > PDWidget (PDAnnotationWidget in my case), it tries to cast it as a > PDFieldTreeNode and throws the exception. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Created] (PDFBOX-2761) Casting error for PDRadioButton when trying to exportFDF
Jason Mackin created PDFBOX-2761: Summary: Casting error for PDRadioButton when trying to exportFDF Key: PDFBOX-2761 URL: https://issues.apache.org/jira/browse/PDFBOX-2761 Project: PDFBox Issue Type: Bug Components: AcroForm Affects Versions: 2.0.0 Reporter: Jason Mackin When trying to exportFDF() in PDAcroForm.java, there is a ClassCastException thrown when addFieldAndChilden(PDFieldTreeNode docField, List fdfFields) is called and the docField is a PDRadioButton that has kids and one is a PDWidget. PDRadioButton.getKids() says: "This will get all the kids of this field. The values in the list will either be PDWidget or PDField. Normally they will be PDWidget objects unless this is a non-terminal field and they will be child PDField objects." But when kids are returned in the addFieldAndChilden method and one is a PDWidget (PDAnnotationWidget in my case), it tries to cast it as a PDFieldTreeNode and throws the exception. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org