[jira] [Commented] (PDFBOX-5164) out version is already 2.0.23 . I want customize the colums myself in the red box use java.
[ https://issues.apache.org/jira/browse/PDFBOX-5164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17323937#comment-17323937 ] Tilman Hausherr commented on PDFBOX-5164: - This is about a single file but you can add several ones. For that, create more "ciDict" dictionaries and of course more PDComplexFileSpecification objects. {code} COSDictionary collectionDic = new COSDictionary(); COSDictionary schemaDict = new COSDictionary(); schemaDict.setItem(COSName.TYPE, COSName.COLLECTION_SCHEMA); COSDictionary sortDic = new COSDictionary(); sortDic.setItem(COSName.TYPE, COSName.COLLECTION_SORT); sortDic.setString(COSName.A, "true"); // sort ascending sortDic.setItem(COSName.S, COSName.getPDFName("fieldtwo")); // "it identifies a field described in the parent collection dictionary" collectionDic.setItem(COSName.TYPE, COSName.COLLECTION); collectionDic.setItem(COSName.SCHEMA, schemaDict); collectionDic.setItem(COSName.SORT, sortDic); collectionDic.setItem(COSName.VIEW, COSName.D); // Details mode COSDictionary fieldDict1 = new COSDictionary(); fieldDict1.setItem(COSName.TYPE, COSName.COLLECTION_FIELD); fieldDict1.setItem(COSName.SUBTYPE, COSName.S); // type: text field fieldDict1.setString(COSName.N, "field header one"); // header text fieldDict1.setInt(COSName.O, 1); // order on the screen COSDictionary fieldDict2 = new COSDictionary(); fieldDict2.setItem(COSName.TYPE, COSName.COLLECTION_FIELD); fieldDict2.setItem(COSName.SUBTYPE, COSName.S); // type: text field fieldDict2.setString(COSName.N, "field header two"); fieldDict2.setInt(COSName.O, 2); COSDictionary fieldDict3 = new COSDictionary(); fieldDict3.setItem(COSName.TYPE, COSName.COLLECTION_FIELD); fieldDict3.setItem(COSName.SUBTYPE, COSName.N); // type: number field fieldDict3.setString(COSName.N, "field header three"); fieldDict3.setInt(COSName.O, 3); schemaDict.setItem("fieldone", fieldDict1); // field name (this is a key) schemaDict.setItem("fieldtwo", fieldDict2); schemaDict.setItem("fieldthree", fieldDict3); doc.getDocumentCatalog().getCOSObject().setItem(COSName.COLLECTION, collectionDic); doc.getDocumentCatalog().setVersion("1.7"); COSDictionary ciDict1 = new COSDictionary(); ciDict1.setItem(COSName.TYPE, COSName.COLLECTION_ITEM); // use the field names from earlier ciDict1.setString("fieldone", "Very interesting file"); ciDict1.setString("fieldtwo", fs.getFile()); ciDict1.setInt("fieldthree", 333); fs.getCOSObject().setItem(COSName.CI, ciDict1); {code} Use the latest snapshot in https://repository.apache.org/content/groups/snapshots/org/apache/pdfbox/pdfbox-app/2.0.24-SNAPSHOT/ (it's building right now) to get the new constants > out version is already 2.0.23 . I want customize the colums myself in the > red box use java. > - > > Key: PDFBOX-5164 > URL: https://issues.apache.org/jira/browse/PDFBOX-5164 > Project: PDFBox > Issue Type: Improvement > Components: Documentation >Affects Versions: 2.0.18 > Environment: java >Reporter: zhouxiaolong >Priority: Major > Fix For: 2.0.24, 4.0.0 > > Attachments: MakePackage.java, collection.pdf, > image-2021-04-15-16-02-42-451.png, screenshot-1.png, viewfiles - 副本.pdf > > > !image-2021-04-15-16-02-42-451.png! -- 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] [Commented] (PDFBOX-5164) out version is already 2.0.23 . I want customize the colums myself in the red box use java.
[ https://issues.apache.org/jira/browse/PDFBOX-5164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17323935#comment-17323935 ] ASF subversion and git services commented on PDFBOX-5164: - Commit 130 from Tilman Hausherr in branch 'pdfbox/trunk' [ https://svn.apache.org/r130 ] PDFBOX-5164: add constants for collections > out version is already 2.0.23 . I want customize the colums myself in the > red box use java. > - > > Key: PDFBOX-5164 > URL: https://issues.apache.org/jira/browse/PDFBOX-5164 > Project: PDFBox > Issue Type: Improvement > Components: Documentation >Affects Versions: 2.0.18 > Environment: java >Reporter: zhouxiaolong >Priority: Major > Fix For: 2.0.24, 4.0.0 > > Attachments: MakePackage.java, collection.pdf, > image-2021-04-15-16-02-42-451.png, screenshot-1.png, viewfiles - 副本.pdf > > > !image-2021-04-15-16-02-42-451.png! -- 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] [Commented] (PDFBOX-5164) out version is already 2.0.23 . I want customize the colums myself in the red box use java.
[ https://issues.apache.org/jira/browse/PDFBOX-5164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17323934#comment-17323934 ] ASF subversion and git services commented on PDFBOX-5164: - Commit 129 from Tilman Hausherr in branch 'pdfbox/branches/2.0' [ https://svn.apache.org/r129 ] PDFBOX-5164: add constants for collections > out version is already 2.0.23 . I want customize the colums myself in the > red box use java. > - > > Key: PDFBOX-5164 > URL: https://issues.apache.org/jira/browse/PDFBOX-5164 > Project: PDFBox > Issue Type: Improvement > Components: Documentation >Affects Versions: 2.0.18 > Environment: java >Reporter: zhouxiaolong >Priority: Major > Fix For: 2.0.24, 4.0.0 > > Attachments: MakePackage.java, collection.pdf, > image-2021-04-15-16-02-42-451.png, screenshot-1.png, viewfiles - 副本.pdf > > > !image-2021-04-15-16-02-42-451.png! -- 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] [Commented] (PDFBOX-5164) out version is already 2.0.23 . I want customize the colums myself in the red box use java.
[ https://issues.apache.org/jira/browse/PDFBOX-5164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17322584#comment-17322584 ] zhouxiaolong commented on PDFBOX-5164: -- I want to create a new portable collection PDF, But i do not how to code > out version is already 2.0.23 . I want customize the colums myself in the > red box use java. > - > > Key: PDFBOX-5164 > URL: https://issues.apache.org/jira/browse/PDFBOX-5164 > Project: PDFBox > Issue Type: Improvement > Components: Documentation >Affects Versions: 2.0.18 > Environment: java >Reporter: zhouxiaolong >Priority: Major > Attachments: MakePackage.java, image-2021-04-15-16-02-42-451.png, > screenshot-1.png, viewfiles - 副本.pdf > > > !image-2021-04-15-16-02-42-451.png! -- 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] [Commented] (PDFBOX-5164) out version is already 2.0.23 . I want customize the colums myself in the red box use java.
[ https://issues.apache.org/jira/browse/PDFBOX-5164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17322575#comment-17322575 ] Tilman Hausherr commented on PDFBOX-5164: - Your code tries to create such a portable collection PDF. But the title of this issue is "customize the columns". Do you want to create a new portable collection PDF OR Do you want to modify ("customize the columns") an existing portable collection PDF ? > out version is already 2.0.23 . I want customize the colums myself in the > red box use java. > - > > Key: PDFBOX-5164 > URL: https://issues.apache.org/jira/browse/PDFBOX-5164 > Project: PDFBox > Issue Type: Improvement > Components: Documentation >Affects Versions: 2.0.18 > Environment: java >Reporter: zhouxiaolong >Priority: Major > Attachments: MakePackage.java, image-2021-04-15-16-02-42-451.png, > screenshot-1.png, viewfiles - 副本.pdf > > > !image-2021-04-15-16-02-42-451.png! -- 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] [Commented] (PDFBOX-5164) out version is already 2.0.23 . I want customize the colums myself in the red box use java.
[ https://issues.apache.org/jira/browse/PDFBOX-5164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17322572#comment-17322572 ] Tilman Hausherr commented on PDFBOX-5164: - Thank you, that is a portable collection PDF (12.3.5 in the 1.7 PDF specification). I've heard of these but I think it's the first time I see one. I had a quick look at your code, I think more needs to be done "Collection". !screenshot-1.png! > out version is already 2.0.23 . I want customize the colums myself in the > red box use java. > - > > Key: PDFBOX-5164 > URL: https://issues.apache.org/jira/browse/PDFBOX-5164 > Project: PDFBox > Issue Type: Improvement > Components: Documentation >Affects Versions: 2.0.18 > Environment: java >Reporter: zhouxiaolong >Priority: Major > Attachments: MakePackage.java, image-2021-04-15-16-02-42-451.png, > screenshot-1.png, viewfiles - 副本.pdf > > > !image-2021-04-15-16-02-42-451.png! -- 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