pdfbox

    0熱度

    1回答

    我遇到了PDFBOX的問題。 所以我創建了一個簡單的代碼: public class DelegationsPdf{ public Delegations getPDF(Delegations delegations) throws IOException{ PDDocument delegation = new PDDocument(); PDDocumentCatalo

    2熱度

    1回答

    我想將一些圖像轉換爲PDDocument對象,而不是保存到硬件。 如何從此PDDocument對象獲取輸入流? 我寫的是吹,得到「創建InputStream調用沒有數據被寫入流之前。」錯誤。 源的部分是: public ByteArrayOutputStream imagesToPdf(final List<ImageEntity> images) throws IOException {

    0熱度

    1回答

    即時通訊嘗試索引pdf文件在lucene 6.6.0和pdfbox 2.0.7 即時通訊獲得一些以下錯誤。 (修改) run: Indexing ke folder: 'D:\Kuliah\rancangan document indexing\dir-index\'... Indexing PDF document: D:\Kuliah\rancangan document

    0熱度

    1回答

    如何從COSName獲取字體? 我正在尋找某種方式看起來像這樣的解決方案: COSDictionary dict = new COSDictionary(); dict.add(fontname, something); // fontname COSName from below code PDFontFactory.createFont(dict); 如果你需要更多的背景,我在下面的原

    1熱度

    1回答

    我寫了一個webapp,它將.pdf與.png文件合併。一切正常,除非輸入的PDF有多個頁面,因爲PDFBox沒有選擇我想疊加的特定頁面的功能。它只有第一,最後,奇數,偶數或全部頁面。我首先使用PDFBox將.png保存在新的PDF上。我的合併方法使用.pngPDF作爲覆蓋並將其放在輸入PDF上。 我對合並的代碼如下: File file2 = new File(getImagePdfLocat

    1熱度

    1回答

    這是我得到的信息從LucenePDFDocument: doc = LucenePDFDocument.getDocument(file); System.out.println("field list: \n" + doc.getFields()); 這是輸出: field list: [<stored<path:D:\Kuliah\rancangan document indexing

    1熱度

    1回答

    我已經創建了3個標籤的簡單PDF文檔:名字,姓氏和照片。然後,我使用Adobe Acrobat PRO DC將2個「文本字段」和一個「圖像字段」添加到AcroForm圖層。 所以,如果我要填寫我可以在常規的Acrobat Reader中打開該PDF文件,並通過鍵入名字,姓氏填滿,以便插入圖片的形式我點擊圖像佔位符和在打開的對話窗口中選擇照片。 但我怎麼能做到同樣的事情編程? 創建使用Apache

    -1熱度

    1回答

    我第一次使用PDFBox生成PDF。我有一個文本文檔,它由一系列由我的java程序生成的約40個多項選擇題組成。有些問題與需要在問題上面插入的小圖片相關聯。 因爲這個原因,我將文本文檔轉換爲PDF格式,並希望在其上插入圖像。 我已經設法插入一個圖像到PDF文檔中,但它的背景是文字。 我想放置圖像符合文本(如在文本格式文本框中,內聯)。 看來插入圖像類需要一個絕對位置,這取決於文本的位置。 如何知道

    0熱度

    1回答

    我想轉換形象使用cameraa到A4 PDF // Read image width and height float imageWidth = bitmap.getWidth(); float imageHeight = bitmap.getHeight(); // Read page width and height ignoring the margins

    2熱度

    1回答

    我需要使用PDFBox API將西里爾文值添加到字段方面的幫助。這是我到目前爲止: PDDocument document = PDDocument.load(file); PDDocumentCatalog dc = document.getDocumentCatalog(); PDAcroForm acroForm = dc.getAcroForm(); PDField naziv =