Merge PDF files

gorgavel
Member Posts: 15
I am trying to merge two files (in1 and in2) and create a new file (ut1=outfile) and I have NO luck.
Se coding example and error message below.
Is there anyone who had success with the Merge function in Bullzip.PdfWriter?
// test
in1 := 'C:\Faktura1.pdf';
in2 := 'C:\default2.pdf';
ut1 := 'C:\Faktura2.pdf';
Datetime := 2000;
Printer := Pdfmerge.DefaultPrinterName();
ComPdfSet := ComPdfSet.ComPdfSettings;
ComPdfSet.SetValue('MergeFile', in1 + '|' + in2);
filin := filin.UploadUtility;
PDFInstans := Pdfmerge.PdfUtil();
Pdfmerge.Merge(ComPdfSet,ut1,Printer,Datetime);
Variables
Pdfmerge DotNet Bullzip.PdfWriter.PdfUtil.'Bullzip.PdfWriter, Version=4.0.0.0, Culture=neutral, PublicKeyToken=041d71cacb6e853c'
in1 Text 30
in2 Text 30
ut1 Text 30
Printer Text 30
Datetime Integer
PdfSet DotNet Bullzip.PdfWriter.PdfSettings.'Bullzip.PdfWriter, Version=4.0.0.0, Culture=neutral, PublicKeyToken=041d71cacb6e853c'
ComPdfSet DotNet Bullzip.PdfWriter.ComPdfSettings.'Bullzip.PdfWriter, Version=4.0.0.0, Culture=neutral, PublicKeyToken=041d71cacb6e853c'
Compdfutil DotNet Bullzip.PdfWriter.ComPdfUtil.'Bullzip.PdfWriter, Version=4.0.0.0, Culture=neutral, PublicKeyToken=041d71cacb6e853c'
infiles DotNet System.String.'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
filin DotNet Bullzip.PdfWriter.UploadUtility.'Bullzip.PdfWriter.Upload, Version=1.0.0.0, Culture=neutral, PublicKeyToken=439886f61986a3e4'
filut File
PDFInstans DotNet Bullzip.PdfWriter.PdfUtil.'Bullzip.PdfWriter, Version=4.0.0.0, Culture=neutral, PublicKeyToken=041d71cacb6e853c'
Error text: A call to Bullzip.PdfWriter.PdfUtil.Merge failed with this message; The type of one or more arguments does not match the method's parameter type.
Help wanted!
NAV Version 2013.
Rgds
Goran
Se coding example and error message below.
Is there anyone who had success with the Merge function in Bullzip.PdfWriter?
// test
in1 := 'C:\Faktura1.pdf';
in2 := 'C:\default2.pdf';
ut1 := 'C:\Faktura2.pdf';
Datetime := 2000;
Printer := Pdfmerge.DefaultPrinterName();
ComPdfSet := ComPdfSet.ComPdfSettings;
ComPdfSet.SetValue('MergeFile', in1 + '|' + in2);
filin := filin.UploadUtility;
PDFInstans := Pdfmerge.PdfUtil();
Pdfmerge.Merge(ComPdfSet,ut1,Printer,Datetime);
Variables
Pdfmerge DotNet Bullzip.PdfWriter.PdfUtil.'Bullzip.PdfWriter, Version=4.0.0.0, Culture=neutral, PublicKeyToken=041d71cacb6e853c'
in1 Text 30
in2 Text 30
ut1 Text 30
Printer Text 30
Datetime Integer
PdfSet DotNet Bullzip.PdfWriter.PdfSettings.'Bullzip.PdfWriter, Version=4.0.0.0, Culture=neutral, PublicKeyToken=041d71cacb6e853c'
ComPdfSet DotNet Bullzip.PdfWriter.ComPdfSettings.'Bullzip.PdfWriter, Version=4.0.0.0, Culture=neutral, PublicKeyToken=041d71cacb6e853c'
Compdfutil DotNet Bullzip.PdfWriter.ComPdfUtil.'Bullzip.PdfWriter, Version=4.0.0.0, Culture=neutral, PublicKeyToken=041d71cacb6e853c'
infiles DotNet System.String.'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
filin DotNet Bullzip.PdfWriter.UploadUtility.'Bullzip.PdfWriter.Upload, Version=1.0.0.0, Culture=neutral, PublicKeyToken=439886f61986a3e4'
filut File
PDFInstans DotNet Bullzip.PdfWriter.PdfUtil.'Bullzip.PdfWriter, Version=4.0.0.0, Culture=neutral, PublicKeyToken=041d71cacb6e853c'
Error text: A call to Bullzip.PdfWriter.PdfUtil.Merge failed with this message; The type of one or more arguments does not match the method's parameter type.
Help wanted!
NAV Version 2013.
Rgds
Goran
0
Comments
-
Think you need this
// Merge with other PDF files. pdfSettings.SetValue('MergeFile', mergeBeforeFileName + '|.|' + mergeAfterFileName);
The information is on the pdf printer website...
http://www.bullzip.com/products/pdf/doc/examples/dynamics-nav-invoices/info.php
Check the sample code and see what might be missing0 -
It looks like the solution provided is almost legit, but it merges two documents with a blank page between them. And it's like the common thing, vast interface-based PDF editors do so in that fashion as well and I don't know why does anybody still figured out this is not supposed to be like that. I do so with this tool https://ds11.pdffiller.com which is paid to use but has a free trial period long enough to sort out things with all the files before it ends-1
-
It's quite difficult to find the problem in code. Maybe it'd be better to ask people, who're working with it. And in case you're not in the IT sphere, you can find some addtional services to help you. To merge 2 files you can use this tool https://pdfliner.com/ds_11_form unfortunately you'll have to pay for it, but prices're not so high-1
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions