[jira] [Commented] (PDFBOX-4216) PDFBox decimal value cutting off in Red Hat Enterprise 7.4
[ https://issues.apache.org/jira/browse/PDFBOX-4216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16472181#comment-16472181 ] Jim Halpert commented on PDFBOX-4216: - [~tilman] Thanks for the explanation. I will try that and update here. > PDFBox decimal value cutting off in Red Hat Enterprise 7.4 > -- > > Key: PDFBOX-4216 > URL: https://issues.apache.org/jira/browse/PDFBOX-4216 > Project: PDFBox > Issue Type: Bug > Components: AcroForm >Affects Versions: 2.0.9 > Environment: LINUX >Reporter: Jim Halpert >Priority: Major > Attachments: .pdfbox.cache, Capture.PNG, pdfbox_issue.PNG, > pdfbox_linux_issue-saved-AR.pdf, pdfbox_linux_issue-saved.pdf, > pdfbox_linux_issue.pdf, test.pdf > > > Facing issue with Pdf decimal value mapping in the pdffiled in LINUX > environment, right side decimal values are cutting off, appreciate quick help > on this. > {code:java} > PDDocument pdfDoc = PDDocument.load(new File("pdfbox_linux_issue.pdf")); > PDDocumentCatalog docCatalog = pdfDoc.getDocumentCatalog(); > PDAcroForm acroForm = docCatalog.getAcroForm(); > Map m = new HashMap(); > m.put("amtPaidForUnit", "15,999.23"); > m.put("amtPubFreightFees", "22.55"); > m.put("amtPaidTotAccessories", "45612.12"); > m.put("dealerDocPrepFees", "55.22"); > m.put("amtDownTradeTotal", "56.89"); > m.put("amtPaidSalesTax", "99.55"); > m.put("amtSerContractTo", "895.66"); > m.put("amtSerContractAmt", "965.36"); > m.put("amtGapProtTo", "798.56"); > m.put("amtGapProtAmt", "64654.33"); > m.put("amtTireGuardTo", "45465.22"); > m.put("amtTireGuardAmt", "455.66"); > m.put("amtPaidOptExtWarr", "88.56"); > m.put("amtPaidOptExtWarrAmt", "663.44"); > m.put("amtPubTitleFees", "54.25"); > m.put("amtPubLicFees", "4654.56"); > m.put("amtPubRegFees", "545.13"); > m.put("amtPubLienFees", "89.22"); > m.put("amtPubFilingFees", "564.65"); > m.put("amtPubStampFees", "56.65"); > m.put("amtPubToAmt", "789.45"); > m.put("amtPubTo2Amt", "15.645"); > m.put("subtotalOfSectionsABC", "13.456"); > m.put("amtLenderOrigFeesAmt", "64.454"); > m.put("amtLender1FeesAmt", "63.56"); > m.put("subtotalOfSection2", "89.12"); > m.put("subtotalOfSection3", "63.45"); > m.put("subtotalOfSection4", "89.15"); > m.put("discAmtFinanced", "63.25"); > for (Object fieldObj : acroForm.getFields()) > { > PDField field = (PDField) fieldObj; > if (m.get(field.getFullyQualifiedName()) != null) // set value of > map when map key and pdf key is matched > { > > field.setValue(m.get(field.getFullyQualifiedName()).toString()); > } > } > > pdfDoc.save(new File("pdfbox_linux_issue-saved.pdf")); > {code} > Works in Windows, Linux Mint, Ubuntu as expected. Issue is only with Red Hat > Enterprise 7.4. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Commented] (PDFBOX-4216) PDFBox decimal value cutting off in Red Hat Enterprise 7.4
[ https://issues.apache.org/jira/browse/PDFBOX-4216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16472149#comment-16472149 ] Tilman Hausherr commented on PDFBOX-4216: - The .pdfbox.cache file is to remember what fonts are on your system, to speed things up. Many PDF files do not have embedded fonts, so we have to choose one that is similar. The problem is that LiberationSans is the "last resort fallback" font, it is proportional and looks completely different than Courier. If you install Courier, PDFBox will notice at the next start that new fonts have been installed and then make a better choice and get the correct width. > PDFBox decimal value cutting off in Red Hat Enterprise 7.4 > -- > > Key: PDFBOX-4216 > URL: https://issues.apache.org/jira/browse/PDFBOX-4216 > Project: PDFBox > Issue Type: Bug > Components: AcroForm >Affects Versions: 2.0.9 > Environment: LINUX >Reporter: Jim Halpert >Priority: Major > Attachments: .pdfbox.cache, Capture.PNG, pdfbox_issue.PNG, > pdfbox_linux_issue-saved-AR.pdf, pdfbox_linux_issue-saved.pdf, > pdfbox_linux_issue.pdf, test.pdf > > > Facing issue with Pdf decimal value mapping in the pdffiled in LINUX > environment, right side decimal values are cutting off, appreciate quick help > on this. > {code:java} > PDDocument pdfDoc = PDDocument.load(new File("pdfbox_linux_issue.pdf")); > PDDocumentCatalog docCatalog = pdfDoc.getDocumentCatalog(); > PDAcroForm acroForm = docCatalog.getAcroForm(); > Map m = new HashMap(); > m.put("amtPaidForUnit", "15,999.23"); > m.put("amtPubFreightFees", "22.55"); > m.put("amtPaidTotAccessories", "45612.12"); > m.put("dealerDocPrepFees", "55.22"); > m.put("amtDownTradeTotal", "56.89"); > m.put("amtPaidSalesTax", "99.55"); > m.put("amtSerContractTo", "895.66"); > m.put("amtSerContractAmt", "965.36"); > m.put("amtGapProtTo", "798.56"); > m.put("amtGapProtAmt", "64654.33"); > m.put("amtTireGuardTo", "45465.22"); > m.put("amtTireGuardAmt", "455.66"); > m.put("amtPaidOptExtWarr", "88.56"); > m.put("amtPaidOptExtWarrAmt", "663.44"); > m.put("amtPubTitleFees", "54.25"); > m.put("amtPubLicFees", "4654.56"); > m.put("amtPubRegFees", "545.13"); > m.put("amtPubLienFees", "89.22"); > m.put("amtPubFilingFees", "564.65"); > m.put("amtPubStampFees", "56.65"); > m.put("amtPubToAmt", "789.45"); > m.put("amtPubTo2Amt", "15.645"); > m.put("subtotalOfSectionsABC", "13.456"); > m.put("amtLenderOrigFeesAmt", "64.454"); > m.put("amtLender1FeesAmt", "63.56"); > m.put("subtotalOfSection2", "89.12"); > m.put("subtotalOfSection3", "63.45"); > m.put("subtotalOfSection4", "89.15"); > m.put("discAmtFinanced", "63.25"); > for (Object fieldObj : acroForm.getFields()) > { > PDField field = (PDField) fieldObj; > if (m.get(field.getFullyQualifiedName()) != null) // set value of > map when map key and pdf key is matched > { > > field.setValue(m.get(field.getFullyQualifiedName()).toString()); > } > } > > pdfDoc.save(new File("pdfbox_linux_issue-saved.pdf")); > {code} > Works in Windows, Linux Mint, Ubuntu as expected. Issue is only with Red Hat > Enterprise 7.4. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Commented] (PDFBOX-4216) PDFBox decimal value cutting off in Red Hat Enterprise 7.4
[ https://issues.apache.org/jira/browse/PDFBOX-4216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16472128#comment-16472128 ] Jim Halpert commented on PDFBOX-4216: - Now that you have mentioned, here's the log message. Now, it's making some sense. {code:java} May 11, 2018 10:13:01 AM org.apache.pdfbox.pdmodel.font.PDType1Font WARNING: Using fallback font LiberationSans for base font Times-Roman May 11, 2018 10:13:01 AM org.apache.pdfbox.pdmodel.font.PDType1Font WARNING: Using fallback font LiberationSans for base font Times-Bold May 11, 2018 10:13:01 AM org.apache.pdfbox.pdmodel.font.PDType1Font WARNING: Using fallback font LiberationSans for base font Times-Italic May 11, 2018 10:13:01 AM org.apache.pdfbox.pdmodel.font.PDType1Font WARNING: Using fallback font LiberationSans for base font Times-BoldItalic May 11, 2018 10:13:01 AM org.apache.pdfbox.pdmodel.font.PDType1Font WARNING: Using fallback font LiberationSans for base font Helvetica May 11, 2018 10:13:01 AM org.apache.pdfbox.pdmodel.font.PDType1Font WARNING: Using fallback font LiberationSans for base font Helvetica-Bold May 11, 2018 10:13:01 AM org.apache.pdfbox.pdmodel.font.PDType1Font WARNING: Using fallback font LiberationSans for base font Helvetica-Oblique May 11, 2018 10:13:01 AM org.apache.pdfbox.pdmodel.font.PDType1Font WARNING: Using fallback font LiberationSans for base font Helvetica-BoldOblique May 11, 2018 10:13:01 AM org.apache.pdfbox.pdmodel.font.PDType1Font WARNING: Using fallback font LiberationSans for base font Courier May 11, 2018 10:13:01 AM org.apache.pdfbox.pdmodel.font.PDType1Font WARNING: Using fallback font LiberationSans for base font Courier-Bold May 11, 2018 10:13:01 AM org.apache.pdfbox.pdmodel.font.PDType1Font WARNING: Using fallback font LiberationSans for base font Courier-Oblique May 11, 2018 10:13:01 AM org.apache.pdfbox.pdmodel.font.PDType1Font WARNING: Using fallback font LiberationSans for base font Courier-BoldOblique May 11, 2018 10:13:01 AM org.apache.pdfbox.pdmodel.font.PDType1Font WARNING: Using fallback font LiberationSans for base font Symbol May 11, 2018 10:13:01 AM org.apache.pdfbox.pdmodel.font.PDType1Font WARNING: Using fallback font LiberationSans for base font ZapfDingbats May 11, 2018 10:13:01 AM org.apache.pdfbox.pdmodel.font.PDType1Font WARNING: Using fallback font LiberationSans for Courier {code} > PDFBox decimal value cutting off in Red Hat Enterprise 7.4 > -- > > Key: PDFBOX-4216 > URL: https://issues.apache.org/jira/browse/PDFBOX-4216 > Project: PDFBox > Issue Type: Bug > Components: AcroForm >Affects Versions: 2.0.9 > Environment: LINUX >Reporter: Jim Halpert >Priority: Major > Attachments: .pdfbox.cache, Capture.PNG, pdfbox_issue.PNG, > pdfbox_linux_issue-saved-AR.pdf, pdfbox_linux_issue-saved.pdf, > pdfbox_linux_issue.pdf, test.pdf > > > Facing issue with Pdf decimal value mapping in the pdffiled in LINUX > environment, right side decimal values are cutting off, appreciate quick help > on this. > {code:java} > PDDocument pdfDoc = PDDocument.load(new File("pdfbox_linux_issue.pdf")); > PDDocumentCatalog docCatalog = pdfDoc.getDocumentCatalog(); > PDAcroForm acroForm = docCatalog.getAcroForm(); > Map m = new HashMap(); > m.put("amtPaidForUnit", "15,999.23"); > m.put("amtPubFreightFees", "22.55"); > m.put("amtPaidTotAccessories", "45612.12"); > m.put("dealerDocPrepFees", "55.22"); > m.put("amtDownTradeTotal", "56.89"); > m.put("amtPaidSalesTax", "99.55"); > m.put("amtSerContractTo", "895.66"); > m.put("amtSerContractAmt", "965.36"); > m.put("amtGapProtTo", "798.56"); > m.put("amtGapProtAmt", "64654.33"); > m.put("amtTireGuardTo", "45465.22"); > m.put("amtTireGuardAmt", "455.66"); > m.put("amtPaidOptExtWarr", "88.56"); > m.put("amtPaidOptExtWarrAmt", "663.44"); > m.put("amtPubTitleFees", "54.25"); > m.put("amtPubLicFees", "4654.56"); > m.put("amtPubRegFees", "545.13"); > m.put("amtPubLienFees", "89.22"); > m.put("amtPubFilingFees", "564.65"); > m.put("amtPubStampFees", "56.65"); > m.put("amtPubToAmt", "789.45"); > m.put("amtPubTo2Amt", "15.645"); > m.put("subtotalOfSectionsABC", "13.456"); > m.put("amtLenderOrigFeesAmt", "64.454"); > m.put("amtLender1FeesAmt", "63.56"); > m.put("subtotalOfSection2", "89.12"); > m.put("subtotalOfSection3", "63.45"); > m.put("subtotalOfSection4", "89.15"); > m.put("discAmtFinanced", "63.25"); > for (Object fieldObj : acroForm.getFields()) > { > PDField field = (PDField) fieldObj; >
[jira] [Commented] (PDFBOX-4216) PDFBox decimal value cutting off in Red Hat Enterprise 7.4
[ https://issues.apache.org/jira/browse/PDFBOX-4216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16472125#comment-16472125 ] Jim Halpert commented on PDFBOX-4216: - [~tilman] Let me understand the soution here. How installing standard 14 fonts solve the issue when pdf box is picking LiberationSans? Can you explain a bit on what is .pdfbox.cache and how it is being used? > PDFBox decimal value cutting off in Red Hat Enterprise 7.4 > -- > > Key: PDFBOX-4216 > URL: https://issues.apache.org/jira/browse/PDFBOX-4216 > Project: PDFBox > Issue Type: Bug > Components: AcroForm >Affects Versions: 2.0.9 > Environment: LINUX >Reporter: Jim Halpert >Priority: Major > Attachments: .pdfbox.cache, Capture.PNG, pdfbox_issue.PNG, > pdfbox_linux_issue-saved-AR.pdf, pdfbox_linux_issue-saved.pdf, > pdfbox_linux_issue.pdf, test.pdf > > > Facing issue with Pdf decimal value mapping in the pdffiled in LINUX > environment, right side decimal values are cutting off, appreciate quick help > on this. > {code:java} > PDDocument pdfDoc = PDDocument.load(new File("pdfbox_linux_issue.pdf")); > PDDocumentCatalog docCatalog = pdfDoc.getDocumentCatalog(); > PDAcroForm acroForm = docCatalog.getAcroForm(); > Map m = new HashMap(); > m.put("amtPaidForUnit", "15,999.23"); > m.put("amtPubFreightFees", "22.55"); > m.put("amtPaidTotAccessories", "45612.12"); > m.put("dealerDocPrepFees", "55.22"); > m.put("amtDownTradeTotal", "56.89"); > m.put("amtPaidSalesTax", "99.55"); > m.put("amtSerContractTo", "895.66"); > m.put("amtSerContractAmt", "965.36"); > m.put("amtGapProtTo", "798.56"); > m.put("amtGapProtAmt", "64654.33"); > m.put("amtTireGuardTo", "45465.22"); > m.put("amtTireGuardAmt", "455.66"); > m.put("amtPaidOptExtWarr", "88.56"); > m.put("amtPaidOptExtWarrAmt", "663.44"); > m.put("amtPubTitleFees", "54.25"); > m.put("amtPubLicFees", "4654.56"); > m.put("amtPubRegFees", "545.13"); > m.put("amtPubLienFees", "89.22"); > m.put("amtPubFilingFees", "564.65"); > m.put("amtPubStampFees", "56.65"); > m.put("amtPubToAmt", "789.45"); > m.put("amtPubTo2Amt", "15.645"); > m.put("subtotalOfSectionsABC", "13.456"); > m.put("amtLenderOrigFeesAmt", "64.454"); > m.put("amtLender1FeesAmt", "63.56"); > m.put("subtotalOfSection2", "89.12"); > m.put("subtotalOfSection3", "63.45"); > m.put("subtotalOfSection4", "89.15"); > m.put("discAmtFinanced", "63.25"); > for (Object fieldObj : acroForm.getFields()) > { > PDField field = (PDField) fieldObj; > if (m.get(field.getFullyQualifiedName()) != null) // set value of > map when map key and pdf key is matched > { > > field.setValue(m.get(field.getFullyQualifiedName()).toString()); > } > } > > pdfDoc.save(new File("pdfbox_linux_issue-saved.pdf")); > {code} > Works in Windows, Linux Mint, Ubuntu as expected. Issue is only with Red Hat > Enterprise 7.4. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Commented] (PDFBOX-4216) PDFBox decimal value cutting off in Red Hat Enterprise 7.4
[ https://issues.apache.org/jira/browse/PDFBOX-4216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16472118#comment-16472118 ] Tilman Hausherr commented on PDFBOX-4216: - So PDFBox uses the fallback font that is included. I suspect that there was a log message. The easiest solution for you would be to install the standard 14 fonts, i.e. courier, times, helvetica/arial, zapf dingbats and symbol. I suspect that the problem in PDFBox is that we take the glyph sizes of the actual font (LiberationSans) instead of the built-in sizes from the AFM files. > PDFBox decimal value cutting off in Red Hat Enterprise 7.4 > -- > > Key: PDFBOX-4216 > URL: https://issues.apache.org/jira/browse/PDFBOX-4216 > Project: PDFBox > Issue Type: Bug > Components: AcroForm >Affects Versions: 2.0.9 > Environment: LINUX >Reporter: Jim Halpert >Priority: Major > Attachments: .pdfbox.cache, Capture.PNG, pdfbox_issue.PNG, > pdfbox_linux_issue-saved-AR.pdf, pdfbox_linux_issue-saved.pdf, > pdfbox_linux_issue.pdf, test.pdf > > > Facing issue with Pdf decimal value mapping in the pdffiled in LINUX > environment, right side decimal values are cutting off, appreciate quick help > on this. > {code:java} > PDDocument pdfDoc = PDDocument.load(new File("pdfbox_linux_issue.pdf")); > PDDocumentCatalog docCatalog = pdfDoc.getDocumentCatalog(); > PDAcroForm acroForm = docCatalog.getAcroForm(); > Map m = new HashMap(); > m.put("amtPaidForUnit", "15,999.23"); > m.put("amtPubFreightFees", "22.55"); > m.put("amtPaidTotAccessories", "45612.12"); > m.put("dealerDocPrepFees", "55.22"); > m.put("amtDownTradeTotal", "56.89"); > m.put("amtPaidSalesTax", "99.55"); > m.put("amtSerContractTo", "895.66"); > m.put("amtSerContractAmt", "965.36"); > m.put("amtGapProtTo", "798.56"); > m.put("amtGapProtAmt", "64654.33"); > m.put("amtTireGuardTo", "45465.22"); > m.put("amtTireGuardAmt", "455.66"); > m.put("amtPaidOptExtWarr", "88.56"); > m.put("amtPaidOptExtWarrAmt", "663.44"); > m.put("amtPubTitleFees", "54.25"); > m.put("amtPubLicFees", "4654.56"); > m.put("amtPubRegFees", "545.13"); > m.put("amtPubLienFees", "89.22"); > m.put("amtPubFilingFees", "564.65"); > m.put("amtPubStampFees", "56.65"); > m.put("amtPubToAmt", "789.45"); > m.put("amtPubTo2Amt", "15.645"); > m.put("subtotalOfSectionsABC", "13.456"); > m.put("amtLenderOrigFeesAmt", "64.454"); > m.put("amtLender1FeesAmt", "63.56"); > m.put("subtotalOfSection2", "89.12"); > m.put("subtotalOfSection3", "63.45"); > m.put("subtotalOfSection4", "89.15"); > m.put("discAmtFinanced", "63.25"); > for (Object fieldObj : acroForm.getFields()) > { > PDField field = (PDField) fieldObj; > if (m.get(field.getFullyQualifiedName()) != null) // set value of > map when map key and pdf key is matched > { > > field.setValue(m.get(field.getFullyQualifiedName()).toString()); > } > } > > pdfDoc.save(new File("pdfbox_linux_issue-saved.pdf")); > {code} > Works in Windows, Linux Mint, Ubuntu as expected. Issue is only with Red Hat > Enterprise 7.4. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Commented] (PDFBOX-4216) PDFBox decimal value cutting off in Red Hat Enterprise 7.4
[ https://issues.apache.org/jira/browse/PDFBOX-4216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16472103#comment-16472103 ] Jim Halpert commented on PDFBOX-4216: - The output to {code:java} System.out.println(((PDType1Font)appearanceStyle.getFont()).getFontBoxFont());{code} For Red Hat, it's *_LiberationSans_* and for WIndows, it's _*CourierNewPSMT.*_ Here's the content of Red Hat *.pdfbox.cache* file {code:java} STIX-Bold|OTF||2bc|0|a1ff|dfff|1|0800|/usr/share/fonts/stix/STIX-Bold.otf STIX-BoldItalic|OTF||2bc|0|a1ff|dfff|3||/usr/share/fonts/stix/STIX-BoldItalic.otf STIX-Italic|OTF||190|0|a1ff|dfff|2||/usr/share/fonts/stix/STIX-Italic.otf STIX-Regular|OTF||190|0|a1ff|dfff|0||/usr/share/fonts/stix/STIX-Regular.otf {code} Here's same file from my windows machine. [^.pdfbox.cache] Clearly, there's a font issue. > PDFBox decimal value cutting off in Red Hat Enterprise 7.4 > -- > > Key: PDFBOX-4216 > URL: https://issues.apache.org/jira/browse/PDFBOX-4216 > Project: PDFBox > Issue Type: Bug > Components: AcroForm >Affects Versions: 2.0.9 > Environment: LINUX >Reporter: Jim Halpert >Priority: Major > Attachments: .pdfbox.cache, Capture.PNG, pdfbox_issue.PNG, > pdfbox_linux_issue-saved-AR.pdf, pdfbox_linux_issue-saved.pdf, > pdfbox_linux_issue.pdf, test.pdf > > > Facing issue with Pdf decimal value mapping in the pdffiled in LINUX > environment, right side decimal values are cutting off, appreciate quick help > on this. > {code:java} > PDDocument pdfDoc = PDDocument.load(new File("pdfbox_linux_issue.pdf")); > PDDocumentCatalog docCatalog = pdfDoc.getDocumentCatalog(); > PDAcroForm acroForm = docCatalog.getAcroForm(); > Map m = new HashMap(); > m.put("amtPaidForUnit", "15,999.23"); > m.put("amtPubFreightFees", "22.55"); > m.put("amtPaidTotAccessories", "45612.12"); > m.put("dealerDocPrepFees", "55.22"); > m.put("amtDownTradeTotal", "56.89"); > m.put("amtPaidSalesTax", "99.55"); > m.put("amtSerContractTo", "895.66"); > m.put("amtSerContractAmt", "965.36"); > m.put("amtGapProtTo", "798.56"); > m.put("amtGapProtAmt", "64654.33"); > m.put("amtTireGuardTo", "45465.22"); > m.put("amtTireGuardAmt", "455.66"); > m.put("amtPaidOptExtWarr", "88.56"); > m.put("amtPaidOptExtWarrAmt", "663.44"); > m.put("amtPubTitleFees", "54.25"); > m.put("amtPubLicFees", "4654.56"); > m.put("amtPubRegFees", "545.13"); > m.put("amtPubLienFees", "89.22"); > m.put("amtPubFilingFees", "564.65"); > m.put("amtPubStampFees", "56.65"); > m.put("amtPubToAmt", "789.45"); > m.put("amtPubTo2Amt", "15.645"); > m.put("subtotalOfSectionsABC", "13.456"); > m.put("amtLenderOrigFeesAmt", "64.454"); > m.put("amtLender1FeesAmt", "63.56"); > m.put("subtotalOfSection2", "89.12"); > m.put("subtotalOfSection3", "63.45"); > m.put("subtotalOfSection4", "89.15"); > m.put("discAmtFinanced", "63.25"); > for (Object fieldObj : acroForm.getFields()) > { > PDField field = (PDField) fieldObj; > if (m.get(field.getFullyQualifiedName()) != null) // set value of > map when map key and pdf key is matched > { > > field.setValue(m.get(field.getFullyQualifiedName()).toString()); > } > } > > pdfDoc.save(new File("pdfbox_linux_issue-saved.pdf")); > {code} > Works in Windows, Linux Mint, Ubuntu as expected. Issue is only with Red Hat > Enterprise 7.4. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Commented] (PDFBOX-4216) PDFBox decimal value cutting off in Red Hat Enterprise 7.4
[ https://issues.apache.org/jira/browse/PDFBOX-4216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16472021#comment-16472021 ] Tilman Hausherr commented on PDFBOX-4216: - Thank you. So it's the width of the text that is different. Please try to output this on both: {code:java} System.out.println(((PDType1Font)appearanceStyle.getFont()).getFontBoxFont());{code} On my system, this shows "CourierNewPSMT". The reason is that the standard 14 fonts can be assigned to different fonts depending the system. Or look into the .pdfbox.cache file as mentioned earlier... > PDFBox decimal value cutting off in Red Hat Enterprise 7.4 > -- > > Key: PDFBOX-4216 > URL: https://issues.apache.org/jira/browse/PDFBOX-4216 > Project: PDFBox > Issue Type: Bug > Components: AcroForm >Affects Versions: 2.0.9 > Environment: LINUX >Reporter: Jim Halpert >Priority: Major > Attachments: Capture.PNG, pdfbox_issue.PNG, > pdfbox_linux_issue-saved-AR.pdf, pdfbox_linux_issue-saved.pdf, > pdfbox_linux_issue.pdf, test.pdf > > > Facing issue with Pdf decimal value mapping in the pdffiled in LINUX > environment, right side decimal values are cutting off, appreciate quick help > on this. > {code:java} > PDDocument pdfDoc = PDDocument.load(new File("pdfbox_linux_issue.pdf")); > PDDocumentCatalog docCatalog = pdfDoc.getDocumentCatalog(); > PDAcroForm acroForm = docCatalog.getAcroForm(); > Map m = new HashMap(); > m.put("amtPaidForUnit", "15,999.23"); > m.put("amtPubFreightFees", "22.55"); > m.put("amtPaidTotAccessories", "45612.12"); > m.put("dealerDocPrepFees", "55.22"); > m.put("amtDownTradeTotal", "56.89"); > m.put("amtPaidSalesTax", "99.55"); > m.put("amtSerContractTo", "895.66"); > m.put("amtSerContractAmt", "965.36"); > m.put("amtGapProtTo", "798.56"); > m.put("amtGapProtAmt", "64654.33"); > m.put("amtTireGuardTo", "45465.22"); > m.put("amtTireGuardAmt", "455.66"); > m.put("amtPaidOptExtWarr", "88.56"); > m.put("amtPaidOptExtWarrAmt", "663.44"); > m.put("amtPubTitleFees", "54.25"); > m.put("amtPubLicFees", "4654.56"); > m.put("amtPubRegFees", "545.13"); > m.put("amtPubLienFees", "89.22"); > m.put("amtPubFilingFees", "564.65"); > m.put("amtPubStampFees", "56.65"); > m.put("amtPubToAmt", "789.45"); > m.put("amtPubTo2Amt", "15.645"); > m.put("subtotalOfSectionsABC", "13.456"); > m.put("amtLenderOrigFeesAmt", "64.454"); > m.put("amtLender1FeesAmt", "63.56"); > m.put("subtotalOfSection2", "89.12"); > m.put("subtotalOfSection3", "63.45"); > m.put("subtotalOfSection4", "89.15"); > m.put("discAmtFinanced", "63.25"); > for (Object fieldObj : acroForm.getFields()) > { > PDField field = (PDField) fieldObj; > if (m.get(field.getFullyQualifiedName()) != null) // set value of > map when map key and pdf key is matched > { > > field.setValue(m.get(field.getFullyQualifiedName()).toString()); > } > } > > pdfDoc.save(new File("pdfbox_linux_issue-saved.pdf")); > {code} > Works in Windows, Linux Mint, Ubuntu as expected. Issue is only with Red Hat > Enterprise 7.4. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Commented] (PDFBOX-4216) PDFBox decimal value cutting off in Red Hat Enterprise 7.4
[ https://issues.apache.org/jira/browse/PDFBOX-4216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16471886#comment-16471886 ] Jim Halpert commented on PDFBOX-4216: - I put bunch of logs and ran the same code in Windows and Red Hat. Left side is Red Hat and Right is Windows output. The only difference is *linewidth* and *startOffset* in PlainTextFormatter#format() method. |+[n|#difference_1]+ |1|bbox = [0.0,0.0,68.34,9.360016]|+[n|#difference_1]+ |1|bbox = [0.0,0.0,68.34,9.360016]| | |2|clipRect = [1.0,1.0,67.34,8.360016]| |2|clipRect = [1.0,1.0,67.34,8.360016]| | |3|contentRect = [2.0,2.0,66.34,7.360016]| |3|contentRect = [2.0,2.0,66.34,7.360016]| | |4|clipRect.getLowerLeftX() = 1.0| |4|clipRect.getLowerLeftX() = 1.0| | |5|clipRect.getLowerLeftY() = 1.0| |5|clipRect.getLowerLeftY() = 1.0| | |6|clipRect.getWidth() = 66.34| |6|clipRect.getWidth() = 66.34| | |7|clipRect.getHeight() = 7.360016| |7|clipRect.getHeight() = 7.360016| |+[n|#difference_2]+ |8|Field = amtGapProtAmt formatter PlainTextFormatter [appearanceStyle=AppearanceStyle [font=PDType1Font Courier, fontSize=10.0, leading=10.55], wrapLines=false, width=64.34, contents=PDPageContentStream [document=org.apache.pdfbox.pdmodel.PDDocument@31fa7bbf, output=/Tx BMC|+[n|#difference_2]+ |8|Field = amtGapProtAmt formatter PlainTextFormatter [appearanceStyle=AppearanceStyle [font=PDType1Font Courier, fontSize=10.0, leading=10.55], wrapLines=false, width=64.34, contents=PDPageContentStream [document=org.apache.pdfbox.pdmodel.PDDocument@2957fcb0, output=/Tx BMC| | |9| | |9| | | |10|q| |10|q| | |11|1 1 66.4 7.36 re| |11|1 1 66.4 7.36 re| | |12|W| |12|W| | |13|n| |13|n| | |14|BT| |14|BT| | |15|/Cour 10 Tf| |15|/Cour 10 Tf| | |16|/DeviceGray cs| |16|/DeviceGray cs| | |17|0 sc| |17|0 sc| |+[n|#difference_3]+ |18|, [resources=org.apache.pdfbox.pdmodel.PDResources@33d2523b|mailto:resources=org.apache.pdfbox.pdmodel.PDResources@33d2523b], inTextMode=true, fontStack=[PDType1Font Courier], nonStrokingColorSpaceStack=[DeviceGray], strokingColorSpaceStack=[], [formatDecimal=java.text.DecimalFormat@674dc|mailto:formatDecimal=java.text.DecimalFormat@674dc], formatBuffer=[48, 48, 51, 54, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]], textContent=PlainText [paragraphs=[org.apache.pdfbox.pdmodel.interactive.form.PlainText$Paragraph@3514ba11]], textAlignment=RIGHT, horizontalOffset=2.0, verticalOffset=1.870008]|+[n|#difference_3]+ |18|, [resources=org.apache.pdfbox.pdmodel.PDResources@1376c05c|mailto:resources=org.apache.pdfbox.pdmodel.PDResources@1376c05c], inTextMode=true, fontStack=[PDType1Font Courier], nonStrokingColorSpaceStack=[DeviceGray], strokingColorSpaceStack=[], [formatDecimal=java.text.DecimalFormat@674dc|mailto:formatDecimal=java.text.DecimalFormat@674dc], formatBuffer=[48, 48, 51, 54, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]], textContent=PlainText [paragraphs=[org.apache.pdfbox.pdmodel.interactive.form.PlainText$Paragraph@51521cc1]], textAlignment=RIGHT, horizontalOffset=2.0, verticalOffset=1.870008]| | |19|lineWidth = 41.708984| |19|lineWidth = 48.007812| | |20|horizontalOffset = 2.0| |20|horizontalOffset = 2.0| |+[n|#difference_4]+ |21|startOffset = 22.69101|+[n|#difference_4]+ |21|startOffset = 16.392181| | |22|=| |22|=| | |23|bbox = [0.0,0.0,64.07999,9.360001]| |23|bbox = [0.0,0.0,64.07999,9.360001]| | |24|clipRect = [1.0,1.0,63.079987,8.360001]| |24|clipRect = [1.0,1.0,63.079987,8.360001]| | |25|contentRect = [2.0,2.0,62.079987,7.366]| |25|contentRect = [2.0,2.0,62.079987,7.366]| | |26|clipRect.getLowerLeftX() = 1.0| |26|clipRect.getLowerLeftX() = 1.0| | |27|clipRect.getLowerLeftY() = 1.0| |27|clipRect.getLowerLeftY() = 1.0| | |28|clipRect.getWidth() = 62.079987| |28|clipRect.getWidth() = 62.079987| | |29|clipRect.getHeight() = 7.366| |29|clipRect.getHeight() = 7.366| |+[n|#difference_5]+ |30|Field = discAmtFinanced formatter PlainTextFormatter [appearanceStyle=AppearanceStyle [font=PDType1Font Courier, fontSize=10.0, leading=10.55], wrapLines=false, width=60.079987, contents=PDPageContentStream [document=org.apache.pdfbox.pdmodel.PDDocument@31fa7bbf, output=/Tx BMC|+[n|#difference_5]+ |30|Field = discAmtFinanced formatter PlainTextFormatter [appearanceStyle=AppearanceStyle [font=PDType1Font Courier, fontSize=10.0, leading=10.55], wrapLines=false, width=60.079987, contents=PDPageContentStream [document=org.apache.pdfbox.pdmodel.PDDocument@2957fcb0, output=/Tx BMC| | |31| | |31| | | |32|q| |32|q| | |33|1 1 62.08 7.36 re| |33|1 1 62.08 7.36 re| | |34|W| |34|W| | |35|n| |35|n| | |36|BT| |36|BT| | |37|/Cour 10 Tf| |37|/Cour 10 Tf| | |38|/DeviceGray cs| |38|
[jira] [Commented] (PDFBOX-4216) PDFBox decimal value cutting off in Red Hat Enterprise 7.4
[ https://issues.apache.org/jira/browse/PDFBOX-4216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16470849#comment-16470849 ] Maruan Sahyoun commented on PDFBOX-4216: Could you run the following code, which prints the field values together with the calculated string width: {code:java} String formTemplate = "test.pdf"; PDDocument pdfDocument = PDDocument.load(new File(formTemplate)); PDAcroForm acroForm = pdfDocument.getDocumentCatalog().getAcroForm(); PDFont cour = acroForm.getDefaultResources().getFont(COSName.getPDFName("Cour")); List fieldList = acroForm.getFields(); for (PDField pdField : fieldList) { String fieldValue = pdField.getValueAsString(); System.out.println("value: " + fieldValue + " width: " + cour.getStringWidth(fieldValue)); } pdfDocument.close(); {code} On my system this prints {noformat} value: 64654.33 width: 4800.7812 value: 63.25 width: 3000.4883 value: width: 0.0 value: 663.44 width: 3600.586 value: TESTPDF ABC width: 6601.074 value: 99.55 width: 3000.4883 value: 56.89 width: 3000.4883 value: TESTPDF width: 4200.6836 value: syf width: 1800.293 value: 895.66 width: 3600.586 value: 55.22 width: 3000.4883 value: 965.36 width: 3600.586 value: 88.56 width: 3000.4883 value: 798.56 width: 3600.586 value: 45465.22 width: 4800.7812 value: 455.66 width: 3600.586 value: width: 0.0 value: width: 0.0 value: width: 0.0 value: width: 0.0 value: width: 0.0 value: 4654.56 width: 4200.6836 value: 545.13 width: 3600.586 value: 564.65 width: 3600.586 value: 89.22 width: 3000.4883 value: 56.65 width: 3000.4883 value: 789.45 width: 3600.586 value: 15.645 width: 3600.586 value: 13.456 width: 3600.586 value: 64.454 width: 3600.586 value: 63.56 width: 3000.4883 value: 89.12 width: 3000.4883 value: 63.45 width: 3000.4883 value: 89.15 width: 3000.4883 value: 54.25 width: 3000.4883 {noformat} > PDFBox decimal value cutting off in Red Hat Enterprise 7.4 > -- > > Key: PDFBOX-4216 > URL: https://issues.apache.org/jira/browse/PDFBOX-4216 > Project: PDFBox > Issue Type: Bug > Components: AcroForm >Affects Versions: 2.0.9 > Environment: LINUX >Reporter: Jim Halpert >Priority: Major > Attachments: Capture.PNG, pdfbox_issue.PNG, > pdfbox_linux_issue-saved-AR.pdf, pdfbox_linux_issue-saved.pdf, > pdfbox_linux_issue.pdf, test.pdf > > > Facing issue with Pdf decimal value mapping in the pdffiled in LINUX > environment, right side decimal values are cutting off, appreciate quick help > on this. > {code:java} > PDDocument pdfDoc = PDDocument.load(new File("pdfbox_linux_issue.pdf")); > PDDocumentCatalog docCatalog = pdfDoc.getDocumentCatalog(); > PDAcroForm acroForm = docCatalog.getAcroForm(); > Map m = new HashMap(); > m.put("amtPaidForUnit", "15,999.23"); > m.put("amtPubFreightFees", "22.55"); > m.put("amtPaidTotAccessories", "45612.12"); > m.put("dealerDocPrepFees", "55.22"); > m.put("amtDownTradeTotal", "56.89"); > m.put("amtPaidSalesTax", "99.55"); > m.put("amtSerContractTo", "895.66"); > m.put("amtSerContractAmt", "965.36"); > m.put("amtGapProtTo", "798.56"); > m.put("amtGapProtAmt", "64654.33"); > m.put("amtTireGuardTo", "45465.22"); > m.put("amtTireGuardAmt", "455.66"); > m.put("amtPaidOptExtWarr", "88.56"); > m.put("amtPaidOptExtWarrAmt", "663.44"); > m.put("amtPubTitleFees", "54.25"); > m.put("amtPubLicFees", "4654.56"); > m.put("amtPubRegFees", "545.13"); > m.put("amtPubLienFees", "89.22"); > m.put("amtPubFilingFees", "564.65"); > m.put("amtPubStampFees", "56.65"); > m.put("amtPubToAmt", "789.45"); > m.put("amtPubTo2Amt", "15.645"); > m.put("subtotalOfSectionsABC", "13.456"); > m.put("amtLenderOrigFeesAmt", "64.454"); > m.put("amtLender1FeesAmt", "63.56"); > m.put("subtotalOfSection2", "89.12"); > m.put("subtotalOfSection3", "63.45"); > m.put("subtotalOfSection4", "89.15"); > m.put("discAmtFinanced", "63.25"); > for (Object fieldObj : acroForm.getFields()) > { > PDField field = (PDField) fieldObj; > if (m.get(field.getFullyQualifiedName()) != null) // set value of > map when map key and pdf key is matched > { > > field.setValue(m.get(field.getFullyQualifiedName()).toString()); > } > } > > pdfDoc.save(new File("pdfbox_linux_issue-saved.pdf")); > {code} > Works in Windows, Linux Mint, Ubuntu as expected. Issue is only with Red Hat > Enterprise 7.4. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsu
[jira] [Commented] (PDFBOX-4216) PDFBox decimal value cutting off in Red Hat Enterprise 7.4
[ https://issues.apache.org/jira/browse/PDFBOX-4216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16470846#comment-16470846 ] Tilman Hausherr commented on PDFBOX-4216: - Another idea - maybe the courier font or its replacements is missing. Please go to your user directory in that redhat system, and open the file .pdfbox.cache, and post all lines that include courier, liberation, and nimbusmon. Make the search case insensitive. Include all lines that have the string, i.e. also "CourierNew". Or just post the whole file. > PDFBox decimal value cutting off in Red Hat Enterprise 7.4 > -- > > Key: PDFBOX-4216 > URL: https://issues.apache.org/jira/browse/PDFBOX-4216 > Project: PDFBox > Issue Type: Bug > Components: AcroForm >Affects Versions: 2.0.9 > Environment: LINUX >Reporter: Jim Halpert >Priority: Major > Attachments: Capture.PNG, pdfbox_issue.PNG, > pdfbox_linux_issue-saved-AR.pdf, pdfbox_linux_issue-saved.pdf, > pdfbox_linux_issue.pdf, test.pdf > > > Facing issue with Pdf decimal value mapping in the pdffiled in LINUX > environment, right side decimal values are cutting off, appreciate quick help > on this. > {code:java} > PDDocument pdfDoc = PDDocument.load(new File("pdfbox_linux_issue.pdf")); > PDDocumentCatalog docCatalog = pdfDoc.getDocumentCatalog(); > PDAcroForm acroForm = docCatalog.getAcroForm(); > Map m = new HashMap(); > m.put("amtPaidForUnit", "15,999.23"); > m.put("amtPubFreightFees", "22.55"); > m.put("amtPaidTotAccessories", "45612.12"); > m.put("dealerDocPrepFees", "55.22"); > m.put("amtDownTradeTotal", "56.89"); > m.put("amtPaidSalesTax", "99.55"); > m.put("amtSerContractTo", "895.66"); > m.put("amtSerContractAmt", "965.36"); > m.put("amtGapProtTo", "798.56"); > m.put("amtGapProtAmt", "64654.33"); > m.put("amtTireGuardTo", "45465.22"); > m.put("amtTireGuardAmt", "455.66"); > m.put("amtPaidOptExtWarr", "88.56"); > m.put("amtPaidOptExtWarrAmt", "663.44"); > m.put("amtPubTitleFees", "54.25"); > m.put("amtPubLicFees", "4654.56"); > m.put("amtPubRegFees", "545.13"); > m.put("amtPubLienFees", "89.22"); > m.put("amtPubFilingFees", "564.65"); > m.put("amtPubStampFees", "56.65"); > m.put("amtPubToAmt", "789.45"); > m.put("amtPubTo2Amt", "15.645"); > m.put("subtotalOfSectionsABC", "13.456"); > m.put("amtLenderOrigFeesAmt", "64.454"); > m.put("amtLender1FeesAmt", "63.56"); > m.put("subtotalOfSection2", "89.12"); > m.put("subtotalOfSection3", "63.45"); > m.put("subtotalOfSection4", "89.15"); > m.put("discAmtFinanced", "63.25"); > for (Object fieldObj : acroForm.getFields()) > { > PDField field = (PDField) fieldObj; > if (m.get(field.getFullyQualifiedName()) != null) // set value of > map when map key and pdf key is matched > { > > field.setValue(m.get(field.getFullyQualifiedName()).toString()); > } > } > > pdfDoc.save(new File("pdfbox_linux_issue-saved.pdf")); > {code} > Works in Windows, Linux Mint, Ubuntu as expected. Issue is only with Red Hat > Enterprise 7.4. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Commented] (PDFBOX-4216) PDFBox decimal value cutting off in Red Hat Enterprise 7.4
[ https://issues.apache.org/jira/browse/PDFBOX-4216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16470788#comment-16470788 ] Tilman Hausherr commented on PDFBOX-4216: - We should trace {{PlainTextFormatter.format()}} to find out what's going on. A good start would be to have width and lineWidth. My results are: lineWidth: 30.004883 width: 64.40001 > PDFBox decimal value cutting off in Red Hat Enterprise 7.4 > -- > > Key: PDFBOX-4216 > URL: https://issues.apache.org/jira/browse/PDFBOX-4216 > Project: PDFBox > Issue Type: Bug > Components: AcroForm >Affects Versions: 2.0.9 > Environment: LINUX >Reporter: Jim Halpert >Priority: Major > Attachments: Capture.PNG, pdfbox_issue.PNG, > pdfbox_linux_issue-saved-AR.pdf, pdfbox_linux_issue-saved.pdf, > pdfbox_linux_issue.pdf, test.pdf > > > Facing issue with Pdf decimal value mapping in the pdffiled in LINUX > environment, right side decimal values are cutting off, appreciate quick help > on this. > {code:java} > PDDocument pdfDoc = PDDocument.load(new File("pdfbox_linux_issue.pdf")); > PDDocumentCatalog docCatalog = pdfDoc.getDocumentCatalog(); > PDAcroForm acroForm = docCatalog.getAcroForm(); > Map m = new HashMap(); > m.put("amtPaidForUnit", "15,999.23"); > m.put("amtPubFreightFees", "22.55"); > m.put("amtPaidTotAccessories", "45612.12"); > m.put("dealerDocPrepFees", "55.22"); > m.put("amtDownTradeTotal", "56.89"); > m.put("amtPaidSalesTax", "99.55"); > m.put("amtSerContractTo", "895.66"); > m.put("amtSerContractAmt", "965.36"); > m.put("amtGapProtTo", "798.56"); > m.put("amtGapProtAmt", "64654.33"); > m.put("amtTireGuardTo", "45465.22"); > m.put("amtTireGuardAmt", "455.66"); > m.put("amtPaidOptExtWarr", "88.56"); > m.put("amtPaidOptExtWarrAmt", "663.44"); > m.put("amtPubTitleFees", "54.25"); > m.put("amtPubLicFees", "4654.56"); > m.put("amtPubRegFees", "545.13"); > m.put("amtPubLienFees", "89.22"); > m.put("amtPubFilingFees", "564.65"); > m.put("amtPubStampFees", "56.65"); > m.put("amtPubToAmt", "789.45"); > m.put("amtPubTo2Amt", "15.645"); > m.put("subtotalOfSectionsABC", "13.456"); > m.put("amtLenderOrigFeesAmt", "64.454"); > m.put("amtLender1FeesAmt", "63.56"); > m.put("subtotalOfSection2", "89.12"); > m.put("subtotalOfSection3", "63.45"); > m.put("subtotalOfSection4", "89.15"); > m.put("discAmtFinanced", "63.25"); > for (Object fieldObj : acroForm.getFields()) > { > PDField field = (PDField) fieldObj; > if (m.get(field.getFullyQualifiedName()) != null) // set value of > map when map key and pdf key is matched > { > > field.setValue(m.get(field.getFullyQualifiedName()).toString()); > } > } > > pdfDoc.save(new File("pdfbox_linux_issue-saved.pdf")); > {code} > Works in Windows, Linux Mint, Ubuntu as expected. Issue is only with Red Hat > Enterprise 7.4. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Commented] (PDFBOX-4216) PDFBox decimal value cutting off in Red Hat Enterprise 7.4
[ https://issues.apache.org/jira/browse/PDFBOX-4216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16470731#comment-16470731 ] Tilman Hausherr commented on PDFBOX-4216: - Your new file: {code:java} /Tx BMC q 1 1 66.4 7.36 re W n BT /Cour 10 Tf /DeviceGray cs 0 sc 41.3756 1.87 Td (99.55) Tj ET Q EMC {code} My file: {code:java} /Tx BMC q 1 1 66.4 7.36 re W n BT /Cour 10 Tf /DeviceGray cs 0 sc 36.3951 1.87 Td (99.55) Tj ET Q EMC {code} So for some reason, the x-offset is different. > PDFBox decimal value cutting off in Red Hat Enterprise 7.4 > -- > > Key: PDFBOX-4216 > URL: https://issues.apache.org/jira/browse/PDFBOX-4216 > Project: PDFBox > Issue Type: Bug > Components: AcroForm >Affects Versions: 2.0.9 > Environment: LINUX >Reporter: Jim Halpert >Priority: Major > Attachments: Capture.PNG, pdfbox_issue.PNG, > pdfbox_linux_issue-saved-AR.pdf, pdfbox_linux_issue-saved.pdf, > pdfbox_linux_issue.pdf, test.pdf > > > Facing issue with Pdf decimal value mapping in the pdffiled in LINUX > environment, right side decimal values are cutting off, appreciate quick help > on this. > {code:java} > PDDocument pdfDoc = PDDocument.load(new File("pdfbox_linux_issue.pdf")); > PDDocumentCatalog docCatalog = pdfDoc.getDocumentCatalog(); > PDAcroForm acroForm = docCatalog.getAcroForm(); > Map m = new HashMap(); > m.put("amtPaidForUnit", "15,999.23"); > m.put("amtPubFreightFees", "22.55"); > m.put("amtPaidTotAccessories", "45612.12"); > m.put("dealerDocPrepFees", "55.22"); > m.put("amtDownTradeTotal", "56.89"); > m.put("amtPaidSalesTax", "99.55"); > m.put("amtSerContractTo", "895.66"); > m.put("amtSerContractAmt", "965.36"); > m.put("amtGapProtTo", "798.56"); > m.put("amtGapProtAmt", "64654.33"); > m.put("amtTireGuardTo", "45465.22"); > m.put("amtTireGuardAmt", "455.66"); > m.put("amtPaidOptExtWarr", "88.56"); > m.put("amtPaidOptExtWarrAmt", "663.44"); > m.put("amtPubTitleFees", "54.25"); > m.put("amtPubLicFees", "4654.56"); > m.put("amtPubRegFees", "545.13"); > m.put("amtPubLienFees", "89.22"); > m.put("amtPubFilingFees", "564.65"); > m.put("amtPubStampFees", "56.65"); > m.put("amtPubToAmt", "789.45"); > m.put("amtPubTo2Amt", "15.645"); > m.put("subtotalOfSectionsABC", "13.456"); > m.put("amtLenderOrigFeesAmt", "64.454"); > m.put("amtLender1FeesAmt", "63.56"); > m.put("subtotalOfSection2", "89.12"); > m.put("subtotalOfSection3", "63.45"); > m.put("subtotalOfSection4", "89.15"); > m.put("discAmtFinanced", "63.25"); > for (Object fieldObj : acroForm.getFields()) > { > PDField field = (PDField) fieldObj; > if (m.get(field.getFullyQualifiedName()) != null) // set value of > map when map key and pdf key is matched > { > > field.setValue(m.get(field.getFullyQualifiedName()).toString()); > } > } > > pdfDoc.save(new File("pdfbox_linux_issue-saved.pdf")); > {code} > Works in Windows, Linux Mint, Ubuntu as expected. Issue is only with Red Hat > Enterprise 7.4. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Commented] (PDFBOX-4216) PDFBox decimal value cutting off in Red Hat Enterprise 7.4
[ https://issues.apache.org/jira/browse/PDFBOX-4216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16470727#comment-16470727 ] Jim Halpert commented on PDFBOX-4216: - [~tilman] Here is the PDF generated in Red Hat. [^test.pdf] [~msahyoun] I used Acrobat Reader in Windows 2018.011.020036 and chrome to view the pdf. I also used Linux Mint and Ubuntu to view the pdf. It's same. > PDFBox decimal value cutting off in Red Hat Enterprise 7.4 > -- > > Key: PDFBOX-4216 > URL: https://issues.apache.org/jira/browse/PDFBOX-4216 > Project: PDFBox > Issue Type: Bug > Components: AcroForm >Affects Versions: 2.0.9 > Environment: LINUX >Reporter: Jim Halpert >Priority: Major > Attachments: Capture.PNG, pdfbox_issue.PNG, > pdfbox_linux_issue-saved-AR.pdf, pdfbox_linux_issue-saved.pdf, > pdfbox_linux_issue.pdf, test.pdf > > > Facing issue with Pdf decimal value mapping in the pdffiled in LINUX > environment, right side decimal values are cutting off, appreciate quick help > on this. > {code:java} > PDDocument pdfDoc = PDDocument.load(new File("pdfbox_linux_issue.pdf")); > PDDocumentCatalog docCatalog = pdfDoc.getDocumentCatalog(); > PDAcroForm acroForm = docCatalog.getAcroForm(); > Map m = new HashMap(); > m.put("amtPaidForUnit", "15,999.23"); > m.put("amtPubFreightFees", "22.55"); > m.put("amtPaidTotAccessories", "45612.12"); > m.put("dealerDocPrepFees", "55.22"); > m.put("amtDownTradeTotal", "56.89"); > m.put("amtPaidSalesTax", "99.55"); > m.put("amtSerContractTo", "895.66"); > m.put("amtSerContractAmt", "965.36"); > m.put("amtGapProtTo", "798.56"); > m.put("amtGapProtAmt", "64654.33"); > m.put("amtTireGuardTo", "45465.22"); > m.put("amtTireGuardAmt", "455.66"); > m.put("amtPaidOptExtWarr", "88.56"); > m.put("amtPaidOptExtWarrAmt", "663.44"); > m.put("amtPubTitleFees", "54.25"); > m.put("amtPubLicFees", "4654.56"); > m.put("amtPubRegFees", "545.13"); > m.put("amtPubLienFees", "89.22"); > m.put("amtPubFilingFees", "564.65"); > m.put("amtPubStampFees", "56.65"); > m.put("amtPubToAmt", "789.45"); > m.put("amtPubTo2Amt", "15.645"); > m.put("subtotalOfSectionsABC", "13.456"); > m.put("amtLenderOrigFeesAmt", "64.454"); > m.put("amtLender1FeesAmt", "63.56"); > m.put("subtotalOfSection2", "89.12"); > m.put("subtotalOfSection3", "63.45"); > m.put("subtotalOfSection4", "89.15"); > m.put("discAmtFinanced", "63.25"); > for (Object fieldObj : acroForm.getFields()) > { > PDField field = (PDField) fieldObj; > if (m.get(field.getFullyQualifiedName()) != null) // set value of > map when map key and pdf key is matched > { > > field.setValue(m.get(field.getFullyQualifiedName()).toString()); > } > } > > pdfDoc.save(new File("pdfbox_linux_issue-saved.pdf")); > {code} > Works in Windows, Linux Mint, Ubuntu as expected. Issue is only with Red Hat > Enterprise 7.4. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Commented] (PDFBOX-4216) PDFBox decimal value cutting off in Red Hat Enterprise 7.4
[ https://issues.apache.org/jira/browse/PDFBOX-4216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16469934#comment-16469934 ] Maruan Sahyoun commented on PDFBOX-4216: Which viewer are you using? On which platform? > PDFBox decimal value cutting off in Red Hat Enterprise 7.4 > -- > > Key: PDFBOX-4216 > URL: https://issues.apache.org/jira/browse/PDFBOX-4216 > Project: PDFBox > Issue Type: Bug > Components: AcroForm >Affects Versions: 2.0.9 > Environment: LINUX >Reporter: Jim Halpert >Priority: Major > Attachments: Capture.PNG, pdfbox_issue.PNG, > pdfbox_linux_issue-saved-AR.pdf, pdfbox_linux_issue-saved.pdf, > pdfbox_linux_issue.pdf > > > Facing issue with Pdf decimal value mapping in the pdffiled in LINUX > environment, right side decimal values are cutting off, appreciate quick help > on this. > {code:java} > PDDocument pdfDoc = PDDocument.load(new File("pdfbox_linux_issue.pdf")); > PDDocumentCatalog docCatalog = pdfDoc.getDocumentCatalog(); > PDAcroForm acroForm = docCatalog.getAcroForm(); > Map m = new HashMap(); > m.put("amtPaidForUnit", "15,999.23"); > m.put("amtPubFreightFees", "22.55"); > m.put("amtPaidTotAccessories", "45612.12"); > m.put("dealerDocPrepFees", "55.22"); > m.put("amtDownTradeTotal", "56.89"); > m.put("amtPaidSalesTax", "99.55"); > m.put("amtSerContractTo", "895.66"); > m.put("amtSerContractAmt", "965.36"); > m.put("amtGapProtTo", "798.56"); > m.put("amtGapProtAmt", "64654.33"); > m.put("amtTireGuardTo", "45465.22"); > m.put("amtTireGuardAmt", "455.66"); > m.put("amtPaidOptExtWarr", "88.56"); > m.put("amtPaidOptExtWarrAmt", "663.44"); > m.put("amtPubTitleFees", "54.25"); > m.put("amtPubLicFees", "4654.56"); > m.put("amtPubRegFees", "545.13"); > m.put("amtPubLienFees", "89.22"); > m.put("amtPubFilingFees", "564.65"); > m.put("amtPubStampFees", "56.65"); > m.put("amtPubToAmt", "789.45"); > m.put("amtPubTo2Amt", "15.645"); > m.put("subtotalOfSectionsABC", "13.456"); > m.put("amtLenderOrigFeesAmt", "64.454"); > m.put("amtLender1FeesAmt", "63.56"); > m.put("subtotalOfSection2", "89.12"); > m.put("subtotalOfSection3", "63.45"); > m.put("subtotalOfSection4", "89.15"); > m.put("discAmtFinanced", "63.25"); > for (Object fieldObj : acroForm.getFields()) > { > PDField field = (PDField) fieldObj; > if (m.get(field.getFullyQualifiedName()) != null) // set value of > map when map key and pdf key is matched > { > > field.setValue(m.get(field.getFullyQualifiedName()).toString()); > } > } > > pdfDoc.save(new File("pdfbox_linux_issue-saved.pdf")); > {code} > Works in Windows, Linux Mint, Ubuntu as expected. Issue is only with Red Hat > Enterprise 7.4. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Commented] (PDFBOX-4216) PDFBox decimal value cutting off in Red Hat Enterprise 7.4
[ https://issues.apache.org/jira/browse/PDFBOX-4216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16469599#comment-16469599 ] Tilman Hausherr commented on PDFBOX-4216: - [~anealkeshi] please do this: - start PDFDebugger - open the file generated on red hat - in the view menu, choose "Show internal structure" - enter this on top: Root/AcroForm/Fields/[4]/AP/N - post what you see in the right window alternatively, attach the file here. > PDFBox decimal value cutting off in Red Hat Enterprise 7.4 > -- > > Key: PDFBOX-4216 > URL: https://issues.apache.org/jira/browse/PDFBOX-4216 > Project: PDFBox > Issue Type: Bug > Components: AcroForm >Affects Versions: 2.0.9 > Environment: LINUX >Reporter: Jim Halpert >Priority: Major > Attachments: Capture.PNG, pdfbox_issue.PNG, > pdfbox_linux_issue-saved-AR.pdf, pdfbox_linux_issue-saved.pdf, > pdfbox_linux_issue.pdf > > > Facing issue with Pdf decimal value mapping in the pdffiled in LINUX > environment, right side decimal values are cutting off, appreciate quick help > on this. > {code:java} > PDDocument pdfDoc = PDDocument.load(new File("pdfbox_linux_issue.pdf")); > PDDocumentCatalog docCatalog = pdfDoc.getDocumentCatalog(); > PDAcroForm acroForm = docCatalog.getAcroForm(); > Map m = new HashMap(); > m.put("amtPaidForUnit", "15,999.23"); > m.put("amtPubFreightFees", "22.55"); > m.put("amtPaidTotAccessories", "45612.12"); > m.put("dealerDocPrepFees", "55.22"); > m.put("amtDownTradeTotal", "56.89"); > m.put("amtPaidSalesTax", "99.55"); > m.put("amtSerContractTo", "895.66"); > m.put("amtSerContractAmt", "965.36"); > m.put("amtGapProtTo", "798.56"); > m.put("amtGapProtAmt", "64654.33"); > m.put("amtTireGuardTo", "45465.22"); > m.put("amtTireGuardAmt", "455.66"); > m.put("amtPaidOptExtWarr", "88.56"); > m.put("amtPaidOptExtWarrAmt", "663.44"); > m.put("amtPubTitleFees", "54.25"); > m.put("amtPubLicFees", "4654.56"); > m.put("amtPubRegFees", "545.13"); > m.put("amtPubLienFees", "89.22"); > m.put("amtPubFilingFees", "564.65"); > m.put("amtPubStampFees", "56.65"); > m.put("amtPubToAmt", "789.45"); > m.put("amtPubTo2Amt", "15.645"); > m.put("subtotalOfSectionsABC", "13.456"); > m.put("amtLenderOrigFeesAmt", "64.454"); > m.put("amtLender1FeesAmt", "63.56"); > m.put("subtotalOfSection2", "89.12"); > m.put("subtotalOfSection3", "63.45"); > m.put("subtotalOfSection4", "89.15"); > m.put("discAmtFinanced", "63.25"); > for (Object fieldObj : acroForm.getFields()) > { > PDField field = (PDField) fieldObj; > if (m.get(field.getFullyQualifiedName()) != null) // set value of > map when map key and pdf key is matched > { > > field.setValue(m.get(field.getFullyQualifiedName()).toString()); > } > } > > pdfDoc.save(new File("pdfbox_linux_issue-saved.pdf")); > {code} > Works in Windows, Linux Mint, Ubuntu as expected. Issue is only with Red Hat > Enterprise 7.4. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Commented] (PDFBOX-4216) PDFBox decimal value cutting off in Red Hat Enterprise 7.4
[ https://issues.apache.org/jira/browse/PDFBOX-4216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16469514#comment-16469514 ] Maruan Sahyoun commented on PDFBOX-4216: @tilman this could be as this is calculated from {{PDFont.getStringWidth(String text)}} > PDFBox decimal value cutting off in Red Hat Enterprise 7.4 > -- > > Key: PDFBOX-4216 > URL: https://issues.apache.org/jira/browse/PDFBOX-4216 > Project: PDFBox > Issue Type: Bug > Components: AcroForm >Affects Versions: 2.0.9 > Environment: LINUX >Reporter: Jim Halpert >Priority: Major > Attachments: Capture.PNG, pdfbox_issue.PNG, > pdfbox_linux_issue-saved-AR.pdf, pdfbox_linux_issue-saved.pdf, > pdfbox_linux_issue.pdf > > > Facing issue with Pdf decimal value mapping in the pdffiled in LINUX > environment, right side decimal values are cutting off, appreciate quick help > on this. > {code:java} > PDDocument pdfDoc = PDDocument.load(new File("pdfbox_linux_issue.pdf")); > PDDocumentCatalog docCatalog = pdfDoc.getDocumentCatalog(); > PDAcroForm acroForm = docCatalog.getAcroForm(); > Map m = new HashMap(); > m.put("amtPaidForUnit", "15,999.23"); > m.put("amtPubFreightFees", "22.55"); > m.put("amtPaidTotAccessories", "45612.12"); > m.put("dealerDocPrepFees", "55.22"); > m.put("amtDownTradeTotal", "56.89"); > m.put("amtPaidSalesTax", "99.55"); > m.put("amtSerContractTo", "895.66"); > m.put("amtSerContractAmt", "965.36"); > m.put("amtGapProtTo", "798.56"); > m.put("amtGapProtAmt", "64654.33"); > m.put("amtTireGuardTo", "45465.22"); > m.put("amtTireGuardAmt", "455.66"); > m.put("amtPaidOptExtWarr", "88.56"); > m.put("amtPaidOptExtWarrAmt", "663.44"); > m.put("amtPubTitleFees", "54.25"); > m.put("amtPubLicFees", "4654.56"); > m.put("amtPubRegFees", "545.13"); > m.put("amtPubLienFees", "89.22"); > m.put("amtPubFilingFees", "564.65"); > m.put("amtPubStampFees", "56.65"); > m.put("amtPubToAmt", "789.45"); > m.put("amtPubTo2Amt", "15.645"); > m.put("subtotalOfSectionsABC", "13.456"); > m.put("amtLenderOrigFeesAmt", "64.454"); > m.put("amtLender1FeesAmt", "63.56"); > m.put("subtotalOfSection2", "89.12"); > m.put("subtotalOfSection3", "63.45"); > m.put("subtotalOfSection4", "89.15"); > m.put("discAmtFinanced", "63.25"); > for (Object fieldObj : acroForm.getFields()) > { > PDField field = (PDField) fieldObj; > if (m.get(field.getFullyQualifiedName()) != null) // set value of > map when map key and pdf key is matched > { > > field.setValue(m.get(field.getFullyQualifiedName()).toString()); > } > } > > pdfDoc.save(new File("pdfbox_linux_issue-saved.pdf")); > {code} > Works in Windows, Linux Mint, Ubuntu as expected. Issue is only with Red Hat > Enterprise 7.4. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Commented] (PDFBOX-4216) PDFBox decimal value cutting off in Red Hat Enterprise 7.4
[ https://issues.apache.org/jira/browse/PDFBOX-4216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16469498#comment-16469498 ] Maruan Sahyoun commented on PDFBOX-4216: Did you create the form yourself? Would it be possible to try using a true type font for the numeric values? Make sure the font is embedded. > PDFBox decimal value cutting off in Red Hat Enterprise 7.4 > -- > > Key: PDFBOX-4216 > URL: https://issues.apache.org/jira/browse/PDFBOX-4216 > Project: PDFBox > Issue Type: Bug > Components: AcroForm >Affects Versions: 2.0.9 > Environment: LINUX >Reporter: Jim Halpert >Priority: Major > Attachments: Capture.PNG, pdfbox_issue.PNG, > pdfbox_linux_issue-saved-AR.pdf, pdfbox_linux_issue-saved.pdf, > pdfbox_linux_issue.pdf > > > Facing issue with Pdf decimal value mapping in the pdffiled in LINUX > environment, right side decimal values are cutting off, appreciate quick help > on this. > {code:java} > PDDocument pdfDoc = PDDocument.load(new File("pdfbox_linux_issue.pdf")); > PDDocumentCatalog docCatalog = pdfDoc.getDocumentCatalog(); > PDAcroForm acroForm = docCatalog.getAcroForm(); > Map m = new HashMap(); > m.put("amtPaidForUnit", "15,999.23"); > m.put("amtPubFreightFees", "22.55"); > m.put("amtPaidTotAccessories", "45612.12"); > m.put("dealerDocPrepFees", "55.22"); > m.put("amtDownTradeTotal", "56.89"); > m.put("amtPaidSalesTax", "99.55"); > m.put("amtSerContractTo", "895.66"); > m.put("amtSerContractAmt", "965.36"); > m.put("amtGapProtTo", "798.56"); > m.put("amtGapProtAmt", "64654.33"); > m.put("amtTireGuardTo", "45465.22"); > m.put("amtTireGuardAmt", "455.66"); > m.put("amtPaidOptExtWarr", "88.56"); > m.put("amtPaidOptExtWarrAmt", "663.44"); > m.put("amtPubTitleFees", "54.25"); > m.put("amtPubLicFees", "4654.56"); > m.put("amtPubRegFees", "545.13"); > m.put("amtPubLienFees", "89.22"); > m.put("amtPubFilingFees", "564.65"); > m.put("amtPubStampFees", "56.65"); > m.put("amtPubToAmt", "789.45"); > m.put("amtPubTo2Amt", "15.645"); > m.put("subtotalOfSectionsABC", "13.456"); > m.put("amtLenderOrigFeesAmt", "64.454"); > m.put("amtLender1FeesAmt", "63.56"); > m.put("subtotalOfSection2", "89.12"); > m.put("subtotalOfSection3", "63.45"); > m.put("subtotalOfSection4", "89.15"); > m.put("discAmtFinanced", "63.25"); > for (Object fieldObj : acroForm.getFields()) > { > PDField field = (PDField) fieldObj; > if (m.get(field.getFullyQualifiedName()) != null) // set value of > map when map key and pdf key is matched > { > > field.setValue(m.get(field.getFullyQualifiedName()).toString()); > } > } > > pdfDoc.save(new File("pdfbox_linux_issue-saved.pdf")); > {code} > Works in Windows, Linux Mint, Ubuntu as expected. Issue is only with Red Hat > Enterprise 7.4. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Commented] (PDFBOX-4216) PDFBox decimal value cutting off in Red Hat Enterprise 7.4
[ https://issues.apache.org/jira/browse/PDFBOX-4216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16469492#comment-16469492 ] Tilman Hausherr commented on PDFBOX-4216: - [~msahyoun] could it be that the x coordinate (here: 12.3912) is somehow OS dependent? > PDFBox decimal value cutting off in Red Hat Enterprise 7.4 > -- > > Key: PDFBOX-4216 > URL: https://issues.apache.org/jira/browse/PDFBOX-4216 > Project: PDFBox > Issue Type: Bug > Components: AcroForm >Affects Versions: 2.0.9 > Environment: LINUX >Reporter: Jim Halpert >Priority: Major > Attachments: Capture.PNG, pdfbox_issue.PNG, > pdfbox_linux_issue-saved-AR.pdf, pdfbox_linux_issue-saved.pdf, > pdfbox_linux_issue.pdf > > > Facing issue with Pdf decimal value mapping in the pdffiled in LINUX > environment, right side decimal values are cutting off, appreciate quick help > on this. > {code:java} > PDDocument pdfDoc = PDDocument.load(new File("pdfbox_linux_issue.pdf")); > PDDocumentCatalog docCatalog = pdfDoc.getDocumentCatalog(); > PDAcroForm acroForm = docCatalog.getAcroForm(); > Map m = new HashMap(); > m.put("amtPaidForUnit", "15,999.23"); > m.put("amtPubFreightFees", "22.55"); > m.put("amtPaidTotAccessories", "45612.12"); > m.put("dealerDocPrepFees", "55.22"); > m.put("amtDownTradeTotal", "56.89"); > m.put("amtPaidSalesTax", "99.55"); > m.put("amtSerContractTo", "895.66"); > m.put("amtSerContractAmt", "965.36"); > m.put("amtGapProtTo", "798.56"); > m.put("amtGapProtAmt", "64654.33"); > m.put("amtTireGuardTo", "45465.22"); > m.put("amtTireGuardAmt", "455.66"); > m.put("amtPaidOptExtWarr", "88.56"); > m.put("amtPaidOptExtWarrAmt", "663.44"); > m.put("amtPubTitleFees", "54.25"); > m.put("amtPubLicFees", "4654.56"); > m.put("amtPubRegFees", "545.13"); > m.put("amtPubLienFees", "89.22"); > m.put("amtPubFilingFees", "564.65"); > m.put("amtPubStampFees", "56.65"); > m.put("amtPubToAmt", "789.45"); > m.put("amtPubTo2Amt", "15.645"); > m.put("subtotalOfSectionsABC", "13.456"); > m.put("amtLenderOrigFeesAmt", "64.454"); > m.put("amtLender1FeesAmt", "63.56"); > m.put("subtotalOfSection2", "89.12"); > m.put("subtotalOfSection3", "63.45"); > m.put("subtotalOfSection4", "89.15"); > m.put("discAmtFinanced", "63.25"); > for (Object fieldObj : acroForm.getFields()) > { > PDField field = (PDField) fieldObj; > if (m.get(field.getFullyQualifiedName()) != null) // set value of > map when map key and pdf key is matched > { > > field.setValue(m.get(field.getFullyQualifiedName()).toString()); > } > } > > pdfDoc.save(new File("pdfbox_linux_issue-saved.pdf")); > {code} > Works in Windows, Linux Mint, Ubuntu as expected. Issue is only with Red Hat > Enterprise 7.4. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Commented] (PDFBOX-4216) PDFBox decimal value cutting off in Red Hat Enterprise 7.4
[ https://issues.apache.org/jira/browse/PDFBOX-4216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16469490#comment-16469490 ] Tilman Hausherr commented on PDFBOX-4216: - The file pdfbox_linux_issue-saved-AR.pdf was generated on windows. The file pdfbox_linux_issue-saved.pdf, was this generated on red hat or was that the one that I had uploaded in the other issue? I have no problem displaying it here. The appearance streams have a very slight difference, but this does not result in stuff being cut off. fron the file here: {code} /Tx BMC q 1 1 66.4 7.36 re W n BT /Cour 10 Tf /DeviceGray cs 0 sc 12.3912 1.87 Td (15,999.23) Tj ET Q EMC {code} with Adobe: {code} /Tx BMC q 1 1 66.4 7.36 re W n BT /Cour 10 Tf 0 g 12.508 1.36 Td (15,998.23) Tj ET Q EMC {code} > PDFBox decimal value cutting off in Red Hat Enterprise 7.4 > -- > > Key: PDFBOX-4216 > URL: https://issues.apache.org/jira/browse/PDFBOX-4216 > Project: PDFBox > Issue Type: Bug > Components: AcroForm >Affects Versions: 2.0.9 > Environment: LINUX >Reporter: Jim Halpert >Priority: Major > Attachments: Capture.PNG, pdfbox_issue.PNG, > pdfbox_linux_issue-saved-AR.pdf, pdfbox_linux_issue-saved.pdf, > pdfbox_linux_issue.pdf > > > Facing issue with Pdf decimal value mapping in the pdffiled in LINUX > environment, right side decimal values are cutting off, appreciate quick help > on this. > {code:java} > PDDocument pdfDoc = PDDocument.load(new File("pdfbox_linux_issue.pdf")); > PDDocumentCatalog docCatalog = pdfDoc.getDocumentCatalog(); > PDAcroForm acroForm = docCatalog.getAcroForm(); > Map m = new HashMap(); > m.put("amtPaidForUnit", "15,999.23"); > m.put("amtPubFreightFees", "22.55"); > m.put("amtPaidTotAccessories", "45612.12"); > m.put("dealerDocPrepFees", "55.22"); > m.put("amtDownTradeTotal", "56.89"); > m.put("amtPaidSalesTax", "99.55"); > m.put("amtSerContractTo", "895.66"); > m.put("amtSerContractAmt", "965.36"); > m.put("amtGapProtTo", "798.56"); > m.put("amtGapProtAmt", "64654.33"); > m.put("amtTireGuardTo", "45465.22"); > m.put("amtTireGuardAmt", "455.66"); > m.put("amtPaidOptExtWarr", "88.56"); > m.put("amtPaidOptExtWarrAmt", "663.44"); > m.put("amtPubTitleFees", "54.25"); > m.put("amtPubLicFees", "4654.56"); > m.put("amtPubRegFees", "545.13"); > m.put("amtPubLienFees", "89.22"); > m.put("amtPubFilingFees", "564.65"); > m.put("amtPubStampFees", "56.65"); > m.put("amtPubToAmt", "789.45"); > m.put("amtPubTo2Amt", "15.645"); > m.put("subtotalOfSectionsABC", "13.456"); > m.put("amtLenderOrigFeesAmt", "64.454"); > m.put("amtLender1FeesAmt", "63.56"); > m.put("subtotalOfSection2", "89.12"); > m.put("subtotalOfSection3", "63.45"); > m.put("subtotalOfSection4", "89.15"); > m.put("discAmtFinanced", "63.25"); > for (Object fieldObj : acroForm.getFields()) > { > PDField field = (PDField) fieldObj; > if (m.get(field.getFullyQualifiedName()) != null) // set value of > map when map key and pdf key is matched > { > > field.setValue(m.get(field.getFullyQualifiedName()).toString()); > } > } > > pdfDoc.save(new File("pdfbox_linux_issue-saved.pdf")); > {code} > Works in Windows, Linux Mint, Ubuntu as expected. Issue is only with Red Hat > Enterprise 7.4. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Commented] (PDFBOX-4216) PDFBox decimal value cutting off in Red Hat Enterprise 7.4
[ https://issues.apache.org/jira/browse/PDFBOX-4216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16469454#comment-16469454 ] Jim Halpert commented on PDFBOX-4216: - [~msahyoun] {code:java} public class MainApplication { public static void main(String[] args) throws IOException { ClassLoader classLoader = MainApplication.class.getClassLoader(); PDDocument pdfDoc = PDDocument.load(new File(classLoader.getResource("pdfbox_linux_issue.pdf").getFile())); PDDocumentCatalog docCatalog = pdfDoc.getDocumentCatalog(); PDAcroForm acroForm = docCatalog.getAcroForm(); Map m = new HashMap<>(); m.put("amtPaidForUnit", "15,999.23"); m.put("amtPubFreightFees", "22.55"); m.put("amtPaidTotAccessories", "45612.12"); m.put("dealerDocPrepFees", "55.22"); m.put("amtDownTradeTotal", "56.89"); m.put("amtPaidSalesTax", "99.55"); m.put("amtSerContractTo", "895.66"); m.put("amtSerContractAmt", "965.36"); m.put("amtGapProtTo", "798.56"); m.put("amtGapProtAmt", "64654.33"); m.put("amtTireGuardTo", "45465.22"); m.put("amtTireGuardAmt", "455.66"); m.put("amtPaidOptExtWarr", "88.56"); m.put("amtPaidOptExtWarrAmt", "663.44"); m.put("amtPubTitleFees", "54.25"); m.put("amtPubLicFees", "4654.56"); m.put("amtPubRegFees", "545.13"); m.put("amtPubLienFees", "89.22"); m.put("amtPubFilingFees", "564.65"); m.put("amtPubStampFees", "56.65"); m.put("amtPubToAmt", "789.45"); m.put("amtPubTo2Amt", "15.645"); m.put("subtotalOfSectionsABC", "13.456"); m.put("amtLenderOrigFeesAmt", "64.454"); m.put("amtLender1FeesAmt", "63.56"); m.put("subtotalOfSection2", "89.12"); m.put("subtotalOfSection3", "63.45"); m.put("subtotalOfSection4", "89.15"); m.put("discAmtFinanced", "63.25"); for (Object fieldObj : acroForm.getFields()) { PDField field = (PDField) fieldObj; if (m.get(field.getFullyQualifiedName()) != null) { field.setValue(m.get(field.getFullyQualifiedName())); } } pdfDoc.save(new File(args[0])); } } {code} I ran this code as jar in Red Hat 7.4 to generate the PDF. Downloaded generated pdf and viewed in multiple machines. PDF generated in any other OS (Windows, Ubuntu, Mint) that I have tried is fine. Only PDF generated in Red Hat machines have the issue. To replicate this issue, the PDF has to be generated in Red Hat 7.4 with ID_LIKE="fedora" (may be other versions as well, currently we have just this). Here's a example of the issue. We can't provide the complete PDF due to restrictions. !Capture.PNG! > PDFBox decimal value cutting off in Red Hat Enterprise 7.4 > -- > > Key: PDFBOX-4216 > URL: https://issues.apache.org/jira/browse/PDFBOX-4216 > Project: PDFBox > Issue Type: Bug > Components: AcroForm >Affects Versions: 2.0.9 > Environment: LINUX >Reporter: Jim Halpert >Priority: Major > Attachments: Capture.PNG, pdfbox_issue.PNG, > pdfbox_linux_issue-saved-AR.pdf, pdfbox_linux_issue-saved.pdf, > pdfbox_linux_issue.pdf > > > Facing issue with Pdf decimal value mapping in the pdffiled in LINUX > environment, right side decimal values are cutting off, appreciate quick help > on this. > {code:java} > PDDocument pdfDoc = PDDocument.load(new File("pdfbox_linux_issue.pdf")); > PDDocumentCatalog docCatalog = pdfDoc.getDocumentCatalog(); > PDAcroForm acroForm = docCatalog.getAcroForm(); > Map m = new HashMap(); > m.put("amtPaidForUnit", "15,999.23"); > m.put("amtPubFreightFees", "22.55"); > m.put("amtPaidTotAccessories", "45612.12"); > m.put("dealerDocPrepFees", "55.22"); > m.put("amtDownTradeTotal", "56.89"); > m.put("amtPaidSalesTax", "99.55"); > m.put("amtSerContractTo", "895.66"); > m.put("amtSerContractAmt", "965.36"); > m.put("amtGapProtTo", "798.56"); > m.put("amtGapProtAmt", "64654.33"); > m.put("amtTireGuardTo", "45465.22"); > m.put("amtTireGuardAmt", "455.66"); > m.put("amtPaidOptExtWarr", "88.56"); > m.put("amtPaidOptExtWarrAmt", "663.44"); > m.put("amtPubTitleFees", "54.25"); > m.put("amtPubLicFees", "4654.56"); > m.put("amtPubRegFees", "545.13"); > m.put("amtPubLienFees", "89.22"); > m.put("amtPubFilingFees", "564.65"); > m.put("amtPubStampFees", "56.65"); > m.put("amtPubToAmt", "789.45"); > m.put("amtPubTo2Amt", "15.645"); > m.put("subtotalOfSectionsABC", "13.456"); > m.put("amtLenderOrigFeesAmt", "64.454"); > m.put("amtLender1FeesAmt", "63.56"); > m.put("subtotalOfSection2", "89.12"); > m.put("subtotalOfSection3", "63.45"); > m.put("subtotalOfSection4", "
[jira] [Commented] (PDFBOX-4216) PDFBox decimal value cutting off in Red Hat Enterprise 7.4
[ https://issues.apache.org/jira/browse/PDFBOX-4216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16469417#comment-16469417 ] Maruan Sahyoun commented on PDFBOX-4216: Could you explain a little better how to reproduce the issue? Has the file [^pdfbox_linux_issue-saved.pdf] been produced on RedHat 7.4? Do we need to view it on RedHat 7.4 to see the issue? Is it happening with several viewers on RedHat 7.4? Which ones? [^pdfbox_issue.PNG] seems to have other data than the PDF. Could you do a screenshot of the complete PDF being viewed in RedHat? Which locale settings are you using on the OS? I tried it on Fedora (27, 28) and CentOS 7 (working fine) but don't have RedHat 7.4 currently installed. > PDFBox decimal value cutting off in Red Hat Enterprise 7.4 > -- > > Key: PDFBOX-4216 > URL: https://issues.apache.org/jira/browse/PDFBOX-4216 > Project: PDFBox > Issue Type: Bug > Components: AcroForm >Affects Versions: 2.0.9 > Environment: LINUX >Reporter: Jim Halpert >Priority: Major > Attachments: pdfbox_issue.PNG, pdfbox_linux_issue-saved-AR.pdf, > pdfbox_linux_issue-saved.pdf, pdfbox_linux_issue.pdf > > > Facing issue with Pdf decimal value mapping in the pdffiled in LINUX > environment, right side decimal values are cutting off, appreciate quick help > on this. > {code:java} > PDDocument pdfDoc = PDDocument.load(new File("pdfbox_linux_issue.pdf")); > PDDocumentCatalog docCatalog = pdfDoc.getDocumentCatalog(); > PDAcroForm acroForm = docCatalog.getAcroForm(); > Map m = new HashMap(); > m.put("amtPaidForUnit", "15,999.23"); > m.put("amtPubFreightFees", "22.55"); > m.put("amtPaidTotAccessories", "45612.12"); > m.put("dealerDocPrepFees", "55.22"); > m.put("amtDownTradeTotal", "56.89"); > m.put("amtPaidSalesTax", "99.55"); > m.put("amtSerContractTo", "895.66"); > m.put("amtSerContractAmt", "965.36"); > m.put("amtGapProtTo", "798.56"); > m.put("amtGapProtAmt", "64654.33"); > m.put("amtTireGuardTo", "45465.22"); > m.put("amtTireGuardAmt", "455.66"); > m.put("amtPaidOptExtWarr", "88.56"); > m.put("amtPaidOptExtWarrAmt", "663.44"); > m.put("amtPubTitleFees", "54.25"); > m.put("amtPubLicFees", "4654.56"); > m.put("amtPubRegFees", "545.13"); > m.put("amtPubLienFees", "89.22"); > m.put("amtPubFilingFees", "564.65"); > m.put("amtPubStampFees", "56.65"); > m.put("amtPubToAmt", "789.45"); > m.put("amtPubTo2Amt", "15.645"); > m.put("subtotalOfSectionsABC", "13.456"); > m.put("amtLenderOrigFeesAmt", "64.454"); > m.put("amtLender1FeesAmt", "63.56"); > m.put("subtotalOfSection2", "89.12"); > m.put("subtotalOfSection3", "63.45"); > m.put("subtotalOfSection4", "89.15"); > m.put("discAmtFinanced", "63.25"); > for (Object fieldObj : acroForm.getFields()) > { > PDField field = (PDField) fieldObj; > if (m.get(field.getFullyQualifiedName()) != null) // set value of > map when map key and pdf key is matched > { > > field.setValue(m.get(field.getFullyQualifiedName()).toString()); > } > } > > pdfDoc.save(new File("pdfbox_linux_issue-saved.pdf")); > {code} > Works in Windows, Linux Mint, Ubuntu as expected. Issue is only with Red Hat > Enterprise 7.4. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Commented] (PDFBOX-4216) PDFBox decimal value cutting off in Red Hat Enterprise 7.4
[ https://issues.apache.org/jira/browse/PDFBOX-4216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16469412#comment-16469412 ] Jim Halpert commented on PDFBOX-4216: - [~tilman] Wait a min. Did you generate the pdf file in Red Hat or upload the file in Red Hat? I generated the file in Red Hat with the code from description. The file you just uploaded is fine. Was it generated in RHEL machine? > PDFBox decimal value cutting off in Red Hat Enterprise 7.4 > -- > > Key: PDFBOX-4216 > URL: https://issues.apache.org/jira/browse/PDFBOX-4216 > Project: PDFBox > Issue Type: Bug > Components: AcroForm >Affects Versions: 2.0.9 > Environment: LINUX >Reporter: Jim Halpert >Priority: Major > Attachments: pdfbox_issue.PNG, pdfbox_linux_issue-saved-AR.pdf, > pdfbox_linux_issue-saved.pdf, pdfbox_linux_issue.pdf > > > Facing issue with Pdf decimal value mapping in the pdffiled in LINUX > environment, right side decimal values are cutting off, appreciate quick help > on this. > {code:java} > PDDocument pdfDoc = PDDocument.load(new File("pdfbox_linux_issue.pdf")); > PDDocumentCatalog docCatalog = pdfDoc.getDocumentCatalog(); > PDAcroForm acroForm = docCatalog.getAcroForm(); > Map m = new HashMap(); > m.put("amtPaidForUnit", "15,999.23"); > m.put("amtPubFreightFees", "22.55"); > m.put("amtPaidTotAccessories", "45612.12"); > m.put("dealerDocPrepFees", "55.22"); > m.put("amtDownTradeTotal", "56.89"); > m.put("amtPaidSalesTax", "99.55"); > m.put("amtSerContractTo", "895.66"); > m.put("amtSerContractAmt", "965.36"); > m.put("amtGapProtTo", "798.56"); > m.put("amtGapProtAmt", "64654.33"); > m.put("amtTireGuardTo", "45465.22"); > m.put("amtTireGuardAmt", "455.66"); > m.put("amtPaidOptExtWarr", "88.56"); > m.put("amtPaidOptExtWarrAmt", "663.44"); > m.put("amtPubTitleFees", "54.25"); > m.put("amtPubLicFees", "4654.56"); > m.put("amtPubRegFees", "545.13"); > m.put("amtPubLienFees", "89.22"); > m.put("amtPubFilingFees", "564.65"); > m.put("amtPubStampFees", "56.65"); > m.put("amtPubToAmt", "789.45"); > m.put("amtPubTo2Amt", "15.645"); > m.put("subtotalOfSectionsABC", "13.456"); > m.put("amtLenderOrigFeesAmt", "64.454"); > m.put("amtLender1FeesAmt", "63.56"); > m.put("subtotalOfSection2", "89.12"); > m.put("subtotalOfSection3", "63.45"); > m.put("subtotalOfSection4", "89.15"); > m.put("discAmtFinanced", "63.25"); > for (Object fieldObj : acroForm.getFields()) > { > PDField field = (PDField) fieldObj; > if (m.get(field.getFullyQualifiedName()) != null) // set value of > map when map key and pdf key is matched > { > > field.setValue(m.get(field.getFullyQualifiedName()).toString()); > } > } > > pdfDoc.save(new File("pdfbox_linux_issue-saved.pdf")); > {code} > Works in Windows, Linux Mint, Ubuntu as expected. Issue is only with Red Hat > Enterprise 7.4. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Commented] (PDFBOX-4216) PDFBox decimal value cutting off in Red Hat Enterprise 7.4
[ https://issues.apache.org/jira/browse/PDFBOX-4216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16469400#comment-16469400 ] Tilman Hausherr commented on PDFBOX-4216: - What happens when you display the file I just uploaded on red hat (which I don't have)? In that one, I changed the field flag and then filled the field with Adobe Reader. > PDFBox decimal value cutting off in Red Hat Enterprise 7.4 > -- > > Key: PDFBOX-4216 > URL: https://issues.apache.org/jira/browse/PDFBOX-4216 > Project: PDFBox > Issue Type: Bug > Components: AcroForm >Affects Versions: 2.0.9 > Environment: LINUX >Reporter: Jim Halpert >Priority: Major > Attachments: pdfbox_issue.PNG, pdfbox_linux_issue-saved-AR.pdf, > pdfbox_linux_issue-saved.pdf, pdfbox_linux_issue.pdf > > > Facing issue with Pdf decimal value mapping in the pdffiled in LINUX > environment, right side decimal values are cutting off, appreciate quick help > on this. > {code:java} > PDDocument pdfDoc = PDDocument.load(new File("pdfbox_linux_issue.pdf")); > PDDocumentCatalog docCatalog = pdfDoc.getDocumentCatalog(); > PDAcroForm acroForm = docCatalog.getAcroForm(); > Map m = new HashMap(); > m.put("amtPaidForUnit", "15,999.23"); > m.put("amtPubFreightFees", "22.55"); > m.put("amtPaidTotAccessories", "45612.12"); > m.put("dealerDocPrepFees", "55.22"); > m.put("amtDownTradeTotal", "56.89"); > m.put("amtPaidSalesTax", "99.55"); > m.put("amtSerContractTo", "895.66"); > m.put("amtSerContractAmt", "965.36"); > m.put("amtGapProtTo", "798.56"); > m.put("amtGapProtAmt", "64654.33"); > m.put("amtTireGuardTo", "45465.22"); > m.put("amtTireGuardAmt", "455.66"); > m.put("amtPaidOptExtWarr", "88.56"); > m.put("amtPaidOptExtWarrAmt", "663.44"); > m.put("amtPubTitleFees", "54.25"); > m.put("amtPubLicFees", "4654.56"); > m.put("amtPubRegFees", "545.13"); > m.put("amtPubLienFees", "89.22"); > m.put("amtPubFilingFees", "564.65"); > m.put("amtPubStampFees", "56.65"); > m.put("amtPubToAmt", "789.45"); > m.put("amtPubTo2Amt", "15.645"); > m.put("subtotalOfSectionsABC", "13.456"); > m.put("amtLenderOrigFeesAmt", "64.454"); > m.put("amtLender1FeesAmt", "63.56"); > m.put("subtotalOfSection2", "89.12"); > m.put("subtotalOfSection3", "63.45"); > m.put("subtotalOfSection4", "89.15"); > m.put("discAmtFinanced", "63.25"); > for (Object fieldObj : acroForm.getFields()) > { > PDField field = (PDField) fieldObj; > if (m.get(field.getFullyQualifiedName()) != null) // set value of > map when map key and pdf key is matched > { > > field.setValue(m.get(field.getFullyQualifiedName()).toString()); > } > } > > pdfDoc.save(new File("pdfbox_linux_issue-saved.pdf")); > {code} > Works in Windows, Linux Mint, Ubuntu as expected. Issue is only with Red Hat > Enterprise 7.4. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Commented] (PDFBOX-4216) PDFBox decimal value cutting off in Red Hat Enterprise 7.4
[ https://issues.apache.org/jira/browse/PDFBOX-4216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16469329#comment-16469329 ] Jim Halpert commented on PDFBOX-4216: - [~tilman] Other guy didn't explain it properly. It's not a chrome issue. The pdf when opened with acrobat reader has same issue. It's either Red Hat Enterprise issue or pdf box issue. If you have Red Hat 7.4, it's reproducible. > PDFBox decimal value cutting off in Red Hat Enterprise 7.4 > -- > > Key: PDFBOX-4216 > URL: https://issues.apache.org/jira/browse/PDFBOX-4216 > Project: PDFBox > Issue Type: Bug > Components: AcroForm >Affects Versions: 2.0.9 > Environment: LINUX >Reporter: Jim Halpert >Priority: Major > Attachments: pdfbox_issue.PNG, pdfbox_linux_issue-saved.pdf, > pdfbox_linux_issue.pdf > > > Facing issue with Pdf decimal value mapping in the pdffiled in LINUX > environment, right side decimal values are cutting off, appreciate quick help > on this. > {code:java} > PDDocument pdfDoc = PDDocument.load(new File("pdfbox_linux_issue.pdf")); > PDDocumentCatalog docCatalog = pdfDoc.getDocumentCatalog(); > PDAcroForm acroForm = docCatalog.getAcroForm(); > Map m = new HashMap(); > m.put("amtPaidForUnit", "15,999.23"); > m.put("amtPubFreightFees", "22.55"); > m.put("amtPaidTotAccessories", "45612.12"); > m.put("dealerDocPrepFees", "55.22"); > m.put("amtDownTradeTotal", "56.89"); > m.put("amtPaidSalesTax", "99.55"); > m.put("amtSerContractTo", "895.66"); > m.put("amtSerContractAmt", "965.36"); > m.put("amtGapProtTo", "798.56"); > m.put("amtGapProtAmt", "64654.33"); > m.put("amtTireGuardTo", "45465.22"); > m.put("amtTireGuardAmt", "455.66"); > m.put("amtPaidOptExtWarr", "88.56"); > m.put("amtPaidOptExtWarrAmt", "663.44"); > m.put("amtPubTitleFees", "54.25"); > m.put("amtPubLicFees", "4654.56"); > m.put("amtPubRegFees", "545.13"); > m.put("amtPubLienFees", "89.22"); > m.put("amtPubFilingFees", "564.65"); > m.put("amtPubStampFees", "56.65"); > m.put("amtPubToAmt", "789.45"); > m.put("amtPubTo2Amt", "15.645"); > m.put("subtotalOfSectionsABC", "13.456"); > m.put("amtLenderOrigFeesAmt", "64.454"); > m.put("amtLender1FeesAmt", "63.56"); > m.put("subtotalOfSection2", "89.12"); > m.put("subtotalOfSection3", "63.45"); > m.put("subtotalOfSection4", "89.15"); > m.put("discAmtFinanced", "63.25"); > for (Object fieldObj : acroForm.getFields()) > { > PDField field = (PDField) fieldObj; > if (m.get(field.getFullyQualifiedName()) != null) // set value of > map when map key and pdf key is matched > { > > field.setValue(m.get(field.getFullyQualifiedName()).toString()); > } > } > > pdfDoc.save(new File("pdfbox_linux_issue-saved.pdf")); > {code} > Works in Windows, Linux Mint, Ubuntu as expected. Issue is only with Red Hat > Enterprise 7.4. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Commented] (PDFBOX-4216) PDFBox decimal value cutting off in Red Hat Enterprise 7.4
[ https://issues.apache.org/jira/browse/PDFBOX-4216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16469319#comment-16469319 ] Tilman Hausherr commented on PDFBOX-4216: - You could have reopened it. Anyway, why do you think it's a PDFBox bug? I think it's a chrome bug. It displays properly everywhere except on a specific OS in chrome. Maybe that OS doesn't have the same fonts installed and chrome can scale properly. > PDFBox decimal value cutting off in Red Hat Enterprise 7.4 > -- > > Key: PDFBOX-4216 > URL: https://issues.apache.org/jira/browse/PDFBOX-4216 > Project: PDFBox > Issue Type: Bug > Components: AcroForm >Affects Versions: 2.0.9 > Environment: LINUX >Reporter: Jim Halpert >Priority: Major > Attachments: pdfbox_issue.PNG, pdfbox_linux_issue-saved.pdf, > pdfbox_linux_issue.pdf > > > Facing issue with Pdf decimal value mapping in the pdffiled in LINUX > environment, right side decimal values are cutting off, appreciate quick help > on this. > {code:java} > PDDocument pdfDoc = PDDocument.load(new File("pdfbox_linux_issue.pdf")); > PDDocumentCatalog docCatalog = pdfDoc.getDocumentCatalog(); > PDAcroForm acroForm = docCatalog.getAcroForm(); > Map m = new HashMap(); > m.put("amtPaidForUnit", "15,999.23"); > m.put("amtPubFreightFees", "22.55"); > m.put("amtPaidTotAccessories", "45612.12"); > m.put("dealerDocPrepFees", "55.22"); > m.put("amtDownTradeTotal", "56.89"); > m.put("amtPaidSalesTax", "99.55"); > m.put("amtSerContractTo", "895.66"); > m.put("amtSerContractAmt", "965.36"); > m.put("amtGapProtTo", "798.56"); > m.put("amtGapProtAmt", "64654.33"); > m.put("amtTireGuardTo", "45465.22"); > m.put("amtTireGuardAmt", "455.66"); > m.put("amtPaidOptExtWarr", "88.56"); > m.put("amtPaidOptExtWarrAmt", "663.44"); > m.put("amtPubTitleFees", "54.25"); > m.put("amtPubLicFees", "4654.56"); > m.put("amtPubRegFees", "545.13"); > m.put("amtPubLienFees", "89.22"); > m.put("amtPubFilingFees", "564.65"); > m.put("amtPubStampFees", "56.65"); > m.put("amtPubToAmt", "789.45"); > m.put("amtPubTo2Amt", "15.645"); > m.put("subtotalOfSectionsABC", "13.456"); > m.put("amtLenderOrigFeesAmt", "64.454"); > m.put("amtLender1FeesAmt", "63.56"); > m.put("subtotalOfSection2", "89.12"); > m.put("subtotalOfSection3", "63.45"); > m.put("subtotalOfSection4", "89.15"); > m.put("discAmtFinanced", "63.25"); > for (Object fieldObj : acroForm.getFields()) > { > PDField field = (PDField) fieldObj; > if (m.get(field.getFullyQualifiedName()) != null) // set value of > map when map key and pdf key is matched > { > > field.setValue(m.get(field.getFullyQualifiedName()).toString()); > } > } > > pdfDoc.save(new File("pdfbox_linux_issue-saved.pdf")); > {code} > Works in Windows, Linux Mint, Ubuntu as expected. Issue is only with Red Hat > Enterprise 7.4. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Commented] (PDFBOX-4216) PDFBox decimal value cutting off in Red Hat Enterprise 7.4
[ https://issues.apache.org/jira/browse/PDFBOX-4216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16469310#comment-16469310 ] Jim Halpert commented on PDFBOX-4216: - [~tilman] Because, that issue isn't resolved. Actually that should be reopened. > PDFBox decimal value cutting off in Red Hat Enterprise 7.4 > -- > > Key: PDFBOX-4216 > URL: https://issues.apache.org/jira/browse/PDFBOX-4216 > Project: PDFBox > Issue Type: Bug > Components: AcroForm >Affects Versions: 2.0.9 > Environment: LINUX >Reporter: Jim Halpert >Priority: Major > Attachments: pdfbox_issue.PNG, pdfbox_linux_issue-saved.pdf, > pdfbox_linux_issue.pdf > > > Facing issue with Pdf decimal value mapping in the pdffiled in LINUX > environment, right side decimal values are cutting off, appreciate quick help > on this. > {code:java} > PDDocument pdfDoc = PDDocument.load(new File("pdfbox_linux_issue.pdf")); > PDDocumentCatalog docCatalog = pdfDoc.getDocumentCatalog(); > PDAcroForm acroForm = docCatalog.getAcroForm(); > Map m = new HashMap(); > m.put("amtPaidForUnit", "15,999.23"); > m.put("amtPubFreightFees", "22.55"); > m.put("amtPaidTotAccessories", "45612.12"); > m.put("dealerDocPrepFees", "55.22"); > m.put("amtDownTradeTotal", "56.89"); > m.put("amtPaidSalesTax", "99.55"); > m.put("amtSerContractTo", "895.66"); > m.put("amtSerContractAmt", "965.36"); > m.put("amtGapProtTo", "798.56"); > m.put("amtGapProtAmt", "64654.33"); > m.put("amtTireGuardTo", "45465.22"); > m.put("amtTireGuardAmt", "455.66"); > m.put("amtPaidOptExtWarr", "88.56"); > m.put("amtPaidOptExtWarrAmt", "663.44"); > m.put("amtPubTitleFees", "54.25"); > m.put("amtPubLicFees", "4654.56"); > m.put("amtPubRegFees", "545.13"); > m.put("amtPubLienFees", "89.22"); > m.put("amtPubFilingFees", "564.65"); > m.put("amtPubStampFees", "56.65"); > m.put("amtPubToAmt", "789.45"); > m.put("amtPubTo2Amt", "15.645"); > m.put("subtotalOfSectionsABC", "13.456"); > m.put("amtLenderOrigFeesAmt", "64.454"); > m.put("amtLender1FeesAmt", "63.56"); > m.put("subtotalOfSection2", "89.12"); > m.put("subtotalOfSection3", "63.45"); > m.put("subtotalOfSection4", "89.15"); > m.put("discAmtFinanced", "63.25"); > for (Object fieldObj : acroForm.getFields()) > { > PDField field = (PDField) fieldObj; > if (m.get(field.getFullyQualifiedName()) != null) // set value of > map when map key and pdf key is matched > { > > field.setValue(m.get(field.getFullyQualifiedName()).toString()); > } > } > > pdfDoc.save(new File("pdfbox_linux_issue-saved.pdf")); > {code} > Works in Windows, Linux Mint, Ubuntu as expected. Issue is only with Red Hat > Enterprise 7.4. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Commented] (PDFBOX-4216) PDFBox decimal value cutting off in Red Hat Enterprise 7.4
[ https://issues.apache.org/jira/browse/PDFBOX-4216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16469308#comment-16469308 ] Tilman Hausherr commented on PDFBOX-4216: - Why did you clone the closed issue? > PDFBox decimal value cutting off in Red Hat Enterprise 7.4 > -- > > Key: PDFBOX-4216 > URL: https://issues.apache.org/jira/browse/PDFBOX-4216 > Project: PDFBox > Issue Type: Bug > Components: AcroForm >Affects Versions: 2.0.9 > Environment: LINUX >Reporter: Jim Halpert >Priority: Major > Attachments: pdfbox_issue.PNG, pdfbox_linux_issue-saved.pdf, > pdfbox_linux_issue.pdf > > > Facing issue with Pdf decimal value mapping in the pdffiled in LINUX > environment, right side decimal values are cutting off, appreciate quick help > on this. > {code:java} > PDDocument pdfDoc = PDDocument.load(new File("pdfbox_linux_issue.pdf")); > PDDocumentCatalog docCatalog = pdfDoc.getDocumentCatalog(); > PDAcroForm acroForm = docCatalog.getAcroForm(); > Map m = new HashMap(); > m.put("amtPaidForUnit", "15,999.23"); > m.put("amtPubFreightFees", "22.55"); > m.put("amtPaidTotAccessories", "45612.12"); > m.put("dealerDocPrepFees", "55.22"); > m.put("amtDownTradeTotal", "56.89"); > m.put("amtPaidSalesTax", "99.55"); > m.put("amtSerContractTo", "895.66"); > m.put("amtSerContractAmt", "965.36"); > m.put("amtGapProtTo", "798.56"); > m.put("amtGapProtAmt", "64654.33"); > m.put("amtTireGuardTo", "45465.22"); > m.put("amtTireGuardAmt", "455.66"); > m.put("amtPaidOptExtWarr", "88.56"); > m.put("amtPaidOptExtWarrAmt", "663.44"); > m.put("amtPubTitleFees", "54.25"); > m.put("amtPubLicFees", "4654.56"); > m.put("amtPubRegFees", "545.13"); > m.put("amtPubLienFees", "89.22"); > m.put("amtPubFilingFees", "564.65"); > m.put("amtPubStampFees", "56.65"); > m.put("amtPubToAmt", "789.45"); > m.put("amtPubTo2Amt", "15.645"); > m.put("subtotalOfSectionsABC", "13.456"); > m.put("amtLenderOrigFeesAmt", "64.454"); > m.put("amtLender1FeesAmt", "63.56"); > m.put("subtotalOfSection2", "89.12"); > m.put("subtotalOfSection3", "63.45"); > m.put("subtotalOfSection4", "89.15"); > m.put("discAmtFinanced", "63.25"); > for (Object fieldObj : acroForm.getFields()) > { > PDField field = (PDField) fieldObj; > if (m.get(field.getFullyQualifiedName()) != null) // set value of > map when map key and pdf key is matched > { > > field.setValue(m.get(field.getFullyQualifiedName()).toString()); > } > } > > pdfDoc.save(new File("pdfbox_linux_issue-saved.pdf")); > {code} > Works in Windows, Linux Mint, Ubuntu as expected. Issue is only with Red Hat > Enterprise 7.4. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org