Merging PDF Documents

ricky76ricky76 Member Posts: 204
Does anyone have any experience of merging a PDF document with another one. I basically have a PDF document that i want to use as a watermark and want to place this document on top of the PDF document that i generate. I am using Amyuni as my PDF converter?

Comments

  • einsTeIn.NETeinsTeIn.NET Member Posts: 1,050
    I don't know about Amyuni, but there are several PDF converters that are able to use an additional PDF as watermark. There should be an explanation in the technical documentation.
    "Money is likewise the greatest chance and the greatest scourge of mankind."
  • fverkelfverkel Member Posts: 66
    Yes, many possibilities.

    TIP: You could set up a virtual printer that automatically adds this watermark PDF. I use this for stationery.
    So when you print from Word or Navision or whatever to this printer, stationery with the company logo is added.

    BTW, I use FreePDF XP. It's free. Also works under Vista.
    Works like a charm.

    http://shbox.de/xpDownload.html
    (Install Ghostscript first.)
    Keep It Simple and Stupid (KISS), but never oversimplify.
  • ricky76ricky76 Member Posts: 204
    Can i do this in code, call this virtual printer to add the PDF? Many thanks.
  • fverkelfverkel Member Posts: 66
    Yes, that's possible.
    We use this for automatically sending documents by e-mail.
    Like e-mailing invoices 'on stationary'.
    Keep It Simple and Stupid (KISS), but never oversimplify.
  • ara3nara3n Member Posts: 9,256
    Here is also a howto for bullzip pdfprinter that supports watermark.

    link bullzip how to

    http://mibuso.com/blogs/ara3n/2008/08/0 ... ts-to-pdf/
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • ricky76ricky76 Member Posts: 204
    My scenario is this. I already create a PDF from Nav that is getting e-mailed. My PDF is also stored in a directory. This PDF needs to have the other PDF document, the watermark, also stored locally, placed on top of it. So do i need to call the virtual printer again once the first PDF has been generated?
  • ara3nara3n Member Posts: 9,256
    For bullzip in setup you can attach the watermark and as documents printed it will include the watermark.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • disadisa Member Posts: 4
    ara3n wrote:
    For bullzip in setup you can attach the watermark and as documents printed it will include the watermark.

    Is there anyway I can get the SuperimposeLayer from the PDF Merge Settings through the Automation :?:

    Is there anyway I can access 'Bullzip'.PDFMergeSettings just like 'Bullzip'.PDFPrinterSettings in your example?

    Thanks in advance for your help
  • ara3nara3n Member Posts: 9,256
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • jlandeenjlandeen Member Posts: 524
    Another product that supports automation and control of PDF printing (and there are properties and functionality to support watermarks) is PDF Exchange by tracker software. They have some really powerful development tools all packaged up in an SDK for use by developers.

    See: http://www.docu-track.com/home/dev_tools/pdf/

    They have a trial version that you can download that is fully functional out of the box for you to test and develop with - it will print it's own trial version stamp in the 4 corners of each page until you pay for a license key. But that at least allows you to try everything and get it working BEFORE you buy. I've recently worked with this product for a client that already had it and it's been one of the simplest PDF printing experiences I've had with NAV to date.
    Jeff Landeen - Sr. Consultant
    Epimatic Corp.

    http://www.epimatic.com
  • disadisa Member Posts: 4
    ara3n wrote:

    Had already checked their forum. Only a couple of threads regarding merging and all of them were never replied to.

    It is doable manually using the Merge tab from the Options, but whilst looking at the documentation I found

    SuperimposeLayer
    (version 6) Much like the watermark layer setting you can also control if the superimposed document is placed over or under the current print job.
    values: top, bottom (default).


    If only I had access to SuperimposLayer function
  • disadisa Member Posts: 4
    jlandeen wrote:
    Another product that supports automation and control of PDF printing (and there are properties and functionality to support watermarks) is PDF Exchange..

    I'm trying to work this out using Bullzip, will consider using PDF Exchange if I dont manage.. but thanks for the information.
  • ara3nara3n Member Posts: 9,256
    Hello You can set the values the following way.


    BullZipPDF.SetValue('ConfirmOverwrite', 'no');
    //MOD01 start
      BullZipPDF.SetValue('Superimpose','c:\download\backgroundpdf.pdf');
      BullZipPDF.SetValue('SuperimposeLayer','bottom');    //the other option is top
    //MOD01 end
    
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • disadisa Member Posts: 4
    ara3n wrote:
    Hello You can set the values the following way.

    BullZipPDF.SetValue('ConfirmOverwrite', 'no');
    //MOD01 start
      BullZipPDF.SetValue('Superimpose','c:\download\backgroundpdf.pdf');
      BullZipPDF.SetValue('SuperimposeLayer','bottom');    //the other option is top
    //MOD01 end
    

    Thanks alot Rashed, had an error before which affected the rest of the settings. Thanks again
  • ara3nara3n Member Posts: 9,256
    you are welcome and good luck.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • jobcigjobcig Member Posts: 2
    Hi all, please i have tried the bullzip automation procedure from the blog but it is not creating the output pdf file.But I’m not getting any error message either. What am I missing please?
  • jlandeenjlandeen Member Posts: 524
    Are you using NAV classic client or NAV RTC? I know there can be some problems with porting printers in the Role Tailored Client.
    Jeff Landeen - Sr. Consultant
    Epimatic Corp.

    http://www.epimatic.com
  • davmac1davmac1 Member Posts: 1,283
    I have written code to merge the sales invoice to other pdfs in a codeunit that works in Classic, but not in RTC. Is this fixable or too bad, so sad?
  • jobcigjobcig Member Posts: 2
    jlandeen wrote:
    Are you using NAV classic client or NAV RTC? I know there can be some problems with porting printers in the Role Tailored Client.
    classic client
  • jlandeenjlandeen Member Posts: 524
    The Bullzip example that I've seen on Mibuso uses the COM control to generate an INI file which should be logged in the same folder as the print driver - have you confirmed that the INI file is actually being generated properly?

    Also have you confirmed that you are selecting the correct printer at print time? This is either happening via report selections or code that is placed in the FindPrinter function in CDU 1 (Application Management).
    Jeff Landeen - Sr. Consultant
    Epimatic Corp.

    http://www.epimatic.com
  • davmac1davmac1 Member Posts: 1,283
    I added the bullzip printer to the printer selection, then the flag settings to the code, and it works without problems in Classic.
    I used the code from one of Rashed's blogs, and the setting information from someone else.

    FileName := SalesInvHeader."No." + '.pdf';
    BullZipPDF.Init;
    BullZipPDF.LoadSettings;
    RunOnceFile := BullZipPDF.GetSettingsFileName(TRUE);
    BullZipPDF.SetValue('Output',FileDirectory+FileName);
    BullZipPDF.SetValue('Showsettings', 'never');
    BullZipPDF.SetValue('ShowPDF', 'no');
    BullZipPDF.SetValue('ShowProgress', 'no');
    BullZipPDF.SetValue('ShowProgressFinished', 'no');
    BullZipPDF.SetValue('SuppressErrors', 'yes');
    BullZipPDF.SetValue('ConfirmOverwrite', 'no');
    BullZipPDF.WriteSettings(TRUE);


    then this code to merge pdfs that were stored using record links:


    IF SalesInvHeader.HASLINKS THEN BEGIN
    MergeFile:='';
    RecLinks.SETRANGE(RecLinks.Description,'Order: ' + SalesInvHeader."Pre-Assigned No.",
    'Order: ' + SalesInvHeader."Pre-Assigned No." + 'z');
    RecLinks.SETRANGE(Company,COMPANYNAME);
    RecLinks.FINDSET;
    REPEAT
    IF MergeFile = '' THEN
    MergeFile:='.|' + RecLinks.URL1
    ELSE
    MergeFile:=MergeFile+'|'+ RecLinks.URL1;

    UNTIL RecLinks.NEXT = 0;
    BullZipPDF.SetValue('MergeFile', MergeFile);
    END;


    REPORT.RUN(ReportSelection."Report ID",FALSE,FALSE,SalesInvHeader);
    BullZipPDF.WriteSettings(TRUE);

    then this code to save the firl to the recordlink for the posted invoice

    SalesInvHeader.ADDLINK(FileDirectory+FileName,'Sales Invoice: ' + SalesInvHeader."No.");
  • DuikmeesterDuikmeester Member Posts: 308
    @SmithJones this is a more than 8 year old post...
Sign In or Register to comment.