Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
10 replies
Subscribers
11 subscribers
Views
7996 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Data and Records
Record extraction to PDF
vasilisg
over 7 years ago
Hi all,
Is there an easy way to generate a PDF from a record, for example, while displaying a record then using a related action a pdf could be generated which later can be printed.
Thank you.
OriginalPostID-257250
Discussion posts and replies are publicly visible
Parents
0
aloks0189
Certified Lead Developer
over 7 years ago
@Vasiling You could use iText API to create a pdf file in java and use Apache POI to access the data in the MS-EXCEL file. If you combine both, you could convert your excel file.
=> So you can combine iText and Apache POI API together while creating the Smart Service
The required parameters could be:
1. existingExcelFile (Type: File)
2. replaceExisting (Type: Boolean)
3. saveInto (Type: Folder)
whereas the output can be the generated document
Alternatively You can try AsposeCells for Java which allows you to convert Excel file to PDF in Java applications while building Smart Service for Excel to PDF
Now coming to code snippet for AsposeCells in java, you can do something as follow:-
=======================================================================
//Instantiate a new workbook with excel file path
Workbook workbook = new Workbook("F:\\\\FileTemp\\\\Book1.xls"); //here you could refer KC Document i.e. existingExcelFile input
//Save the document in Pdf format
workbook.save("F:\\\\FileTemp\\\\MyPdfFile.pdf", FileFormatType.PDF); //Here you could refers saveInto
======================================================================
Hope this will help you to take a initiative in order to build a Smart Service to convert Dynamically Generated Excel to PDF
Thanks
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
aloks0189
Certified Lead Developer
over 7 years ago
@Vasiling You could use iText API to create a pdf file in java and use Apache POI to access the data in the MS-EXCEL file. If you combine both, you could convert your excel file.
=> So you can combine iText and Apache POI API together while creating the Smart Service
The required parameters could be:
1. existingExcelFile (Type: File)
2. replaceExisting (Type: Boolean)
3. saveInto (Type: Folder)
whereas the output can be the generated document
Alternatively You can try AsposeCells for Java which allows you to convert Excel file to PDF in Java applications while building Smart Service for Excel to PDF
Now coming to code snippet for AsposeCells in java, you can do something as follow:-
=======================================================================
//Instantiate a new workbook with excel file path
Workbook workbook = new Workbook("F:\\\\FileTemp\\\\Book1.xls"); //here you could refer KC Document i.e. existingExcelFile input
//Save the document in Pdf format
workbook.save("F:\\\\FileTemp\\\\MyPdfFile.pdf", FileFormatType.PDF); //Here you could refers saveInto
======================================================================
Hope this will help you to take a initiative in order to build a Smart Service to convert Dynamically Generated Excel to PDF
Thanks
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data