#1
|
|||
|
|||
![]()
Hi Guys,
I'm trying to encode and decode the pdf file to identify the differences in the output files. While doing so, i like to count the number of pages available in the pdf, which would be of great help from user perspective. I can encode and decode the pdf file but i couldn't identify a way to count number of pages in the pdf. can u guys help me on this? mirth3.3.1 |
#2
|
|||
|
|||
![]() |
#3
|
|||
|
|||
![]()
Hi rauchj,
I tried the link and got into http://pdfbox.apache.org/download.html to use pdfbox apache and got apache pdfbox jar file and placed them in custom-lib folder of mirth but couldn't find those code working, neither i noticed the inclusion of additional in-built functions inside mirth. Is this a rightway? Am I doing it correctly? .or am I going wron somewhere? |
#4
|
|||
|
|||
![]()
what mirth version do you use?
have a look here: http://www.mirthcorp.com/community/w...+Mirth+Connect |
#5
|
|||
|
|||
![]()
Was recently looking how to do this and couldn't find much on the forums so here's a snippet that worked using a File Reader
Code:
var srcFile = sourceMap.get('originalFilename'); var srcDir = sourceMap.get('fileDirectory'); var fileConts = FileUtil.readBytes(srcDir +'/' +srcFile); var file = new Packages.com.itextpdf.text.pdf.PdfReader(fileConts); var pageNum = file.getNumberOfPages(); pageNum = pageNum.toString().substring(0,1); file.close(); |
![]() |
Tags |
ccda, mirth3.3.1, pdf |
Thread Tools | |
Display Modes | |
|
|