[jira] [Comment Edited] (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=16472118#comment-16472118 ] Tilman Hausherr edited comment on PDFBOX-4216 at 1/7/21, 7:10 AM: -- 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. (Update 7.1.2021 if we ever decide to check this: CreateCheckBox.java uses the AFM values) was (Author: tilman): 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 (v8.3.4#803005) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Comment Edited] (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=16484364#comment-16484364 ] Tilman Hausherr edited comment on PDFBOX-4216 at 5/22/18 5:59 PM: -- reopening because IMHO this is a bug, although the workaround (which you did now) is easy. As I wrote "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." Ideally, it should be possible to use standard 14 fonts to create PDF files even if none of these fonts are on the system... was (Author: tilman): reopening because IMHO this is a bug, although the workaround is easy. As I wrote "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." Ideally, it should be possible to use standard 14 fonts to create PDF files even if none of these fonts are on the system... > 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] [Comment Edited] (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=16472125#comment-16472125 ] Jim Halpert edited comment on PDFBOX-4216 at 5/11/18 3:39 PM: -- [~tilman] Let me understand the solution 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? was (Author: anealkeshi): [~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] [Comment Edited] (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=16470788#comment-16470788 ] Tilman Hausherr edited comment on PDFBOX-4216 at 5/10/18 5:29 PM: -- We should trace {{PlainTextFormatter.format()}} to find out what's going on. A good start would be to have width and lineWidth. My results (when setting amtPaidSalesTax) are: lineWidth: 30.004883 width: 64.40001 was (Author: tilman): 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] [Comment Edited] (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=16470731#comment-16470731 ] Tilman Hausherr edited comment on PDFBOX-4216 at 5/10/18 5:02 PM: -- Comparing widget 17 (sales tax): 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. was (Author: tilman): 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] [Comment Edited] (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=16469514#comment-16469514 ] Maruan Sahyoun edited comment on PDFBOX-4216 at 5/9/18 9:15 PM: @tilman this could be as this is calculated from {{PDFont.getStringWidth(String text)}}. The metrics Adobe retrieves from the fonts are also slightly different to what we retrieve, at least with the files I tested while developing the formatting. was (Author: msahyoun): @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] [Comment Edited] (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=16469417#comment-16469417 ] Maruan Sahyoun edited comment on PDFBOX-4216 at 5/9/18 8:19 PM: 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. Viewing [^pdfbox_linux_issue-saved.pdf] on the above linux boxes, Mac OS and Windows is also fine. was (Author: msahyoun): 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