Groups | Search | Server Info | Login | Register


Groups > comp.databases.ms-access > #14168

Re: merging pdf files

Newsgroups comp.databases.ms-access
Date 2020-08-03 08:02 -0700
References <61499416-2fc8-4100-bdd0-6a97da2a0edao@googlegroups.com> <22ff53e4-9e92-4080-8af3-2e1719e544d7n@googlegroups.com> <1947e6cb-18d6-457f-8ae3-d77027debbaao@googlegroups.com> <1b8aab9b-a657-46f4-92ad-4a6f2bc37d01n@googlegroups.com>
Message-ID <92d334ad-8b1f-421b-ad1e-4e6130a23bf2n@googlegroups.com> (permalink)
Subject Re: merging pdf files
From Ron Paii <ron81pai@gmail.com>

Show all headers | View raw


On Monday, August 3, 2020 at 8:55:57 AM UTC-5, Ron Paii wrote:
> On Monday, August 3, 2020 at 2:50:02 AM UTC-5, internet...@foobox.com wrote: 
> > Albert, you say: 
> > "So, I only merged 2 files, but you can have 2 or 10 files." 
> > I assume that this is only illustrative and that there is no limit to the number of files. 
> > 
> > Am I correct? 
> > Jim 
> > 
> > On Sunday, 2 August 2020 05:40:57 UTC+1, Albert Kallal (Access MVP) wrote: 
> > > On Friday, July 31, 2020 at 7:33:58 AM UTC-6, internet...@foobox.com wrote: 
> > > 
> > > > For many years I have used Stephen Lebans ReportToPdf that has worked well until now. 
> > > 
> > > Yes, a lot of us used that utility. and before Access/Office 2007, we also used his PDF creator. 
> > > 
> > > Thankfully, now (even with runtime) we can create PDF's from Access - even the runtime, and NOT require any PDF drivers or even software to be installed - nice! 
> > > 
> > > > 
> > > > I am needing to transfer the system to 64 bit Windows and the library StrStorage.dll fails to load. 
> > > 
> > > All recent versions of windows (for quite a long time name) have be OS x64 bits. 
> > > 
> > > However, until rather recent, office installs remained x32 bits. 
> > > 
> > > > I am not that familiar with the workings of libraries but I am assuming that MergePDFDocuments in a function within the StrStorage.dll 
> > > 
> > > It was in one of the two .dll's, can't remember. However that .dll is a x32 bit windows .dll. 
> > > 
> > > > I have downloaded what I think is a newer version of StrStorage.dll but it fails to load. 
> > > > hLibStrStorage = LoadLibrary(CurrentDBDir() & "StrStorage.dll") 
> > > > The file exists and is in the correct place 
> > > > 
> > > > I am assuming that it is for 32 bit systems. 
> > > 
> > > You are correct. It is a win x32 bit file. Since you now using VBA and office x64 bits? 
> > > Then of course you can't use those .dll's anymore. 
> > > And the wonderful Stephan's? He not been around the access scene for a good 13 or more years. 
> > > 
> > > 
> > > > Has anyone any knowledge of this? 
> > > 
> > > Yes, I very much know this stuff! 
> > > 
> > > > 
> > > > Is there another way of merging pdf documents without buying the full version of Acrobat? 
> > > 
> > > Yes, I created a .net .dll that can work with x32 or x64 bits. 
> > > I also use the "load library" approach that Stephan used for his PDF stuff. 
> > > 
> > > I just simply don't have the time to correctly put up a web page. 
> > > 
> > > But I have a loader, one for x64 bits, and one for x32. 
> > > This loader can load any .net .dll. For .net, x32 or x64 bits does NOT matter (if the code was compiled using ANY CPU). 
> > > However the loader must match. 
> > > 
> > > To use: 
> > > You have to place the .dll nloader and the Pmerge.dll in your front end folder (same as PDF merge). 
> > > Now since the two loader.dll's are VERY small, then you might as well make a habit of placng both in the folder. 
> > > 
> > > So, we have a total of 3 files: 
> > > nloader.dll - x32 bit loader 
> > > nloader64.dll - x64 bit loader 
> > > Pmerge.dll - new .net PDF merge 
> > > 
> > > So, place the above 3 files in the folder. 
> > > 
> > > The VBA code to merge is now this: 
> > > 
> > > Dim MyPdf As Object 
> > > Set MyPdf = CreateObjectNET("Pmerge.dll", "Pmerge.Pmerge") 
> > > 
> > > 
> > > MyPdf.Add "c:\test4\p1.pdf" 
> > > MyPdf.Add "c:\test4\p2.pdf" 
> > > 
> > > MyPdf.OutPutDoc = "c:\test4\P1ANDP2.pdf" 
> > > 
> > > MyPdf.Merge 
> > > 
> > > So, I only merged 2 files, but you can have 2 or 10 files. 
> > > There is also a 
> > > MyPdf.Clear 
> > > That just clears out the files if you want to merge again (and if you JUST created the MyPDF object, then no need for clear. 
> > > 
> > > So, only 3 tiny .dll's. 
> > > And it AUTOMATIC works for x32 or x64 - you don't have to do anything or change the code. It will work for both x32 and x64. 
> > > 
> > > the example assumes Access 2010 or later (I have the VBA test for x64 bits - so, if for SOME strange reason someone wants to use this in a pre-access 2010? It WILL work fine, but you have to remote the #Win64 test/check I have, since only 2010 and later has this built in test/check in VBA for x32/x64. 
> > > 
> > > You can download from my skydrive - it is a sample accDB and the above 3 .dll's. 
> > > 
> > > To use in YOUR application? You just need to import the ONE code module. 
> > > (NetLoader). 
> > > 
> > > So, this example: 
> > > Super easy, super simple to use. 
> > > No registration, no installer. 
> > > It just works. 
> > > 
> > > Here is a skydrive link to the zip file - do try it - perhaps post back. As I stated I don't have time to write up a web page. So, you have to just take your time, and look at the sample code. However, the sample code above is all you really need. 
> > > Please do give it a try, and at least throw the community a dog bone here that this worked for you. 
> > > 
> > > Link: 
> > > https://1drv.ms/u/s!Avrwal_LV4qxhphvq4_Ce9EmZFMbEA?e=Je7dmU 
> > > 
> > > Now, the above is actually based on PDFSharp - it has MANY cool features: 
> > > Modify, merge, and split existing PDF files. However, I have only exposed the merge feature, but there are quite a fw more features that I could "just" expose. 
> > > 
> > > Good luck! - post back if this works for you. 
> > > Albert D. Kallal (Access MVP 2003-2017) 
> > > Edmonton, Alberta Canada 
> > > pleaseNoS...@msn.com
> First, Allen thanks for the dll info. 
> 
> I am having trouble with your sample database. I get a err.lastDllError 203 after executing hLibDynaPDF = LoadLibrary(CurrentProject.Path & "\" & strDll). It's returning a non-zero value. because of this MyCreateObject(CurrentProject.Path & "\" & strDll, strClass) returns nothing. 
> 
> dll error 203, The system could not find the environment option that was entered. 
> 
> Do I need to register any of the COM objects? 
> 
> Access 2016 32bit on Windows 8.1 64bit 
> references are 
> Visual Basic For Applications 
> Microsoft Access 16.0 Object Library 
> Microsoft Office 16.0 Access database engine Object Library 
> OLE Automation 
> 
> I also tried it on Access 2010 32bit on Windows 7 64bit
Sorry,
Thank you Albert.

Back to comp.databases.ms-access | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

merging pdf files internet.shopping@foobox.com - 2020-07-31 06:33 -0700
  Re: merging pdf files samxjones2@gmail.com - 2020-07-31 07:02 -0700
    Re: merging pdf files internet.shopping@foobox.com - 2020-07-31 08:51 -0700
  Re: merging pdf files "Albert Kallal (Access MVP)" <kallal@msn.com> - 2020-08-01 21:40 -0700
    Re: merging pdf files internet.shopping@foobox.com - 2020-08-02 07:49 -0700
      Re: merging pdf files "Albert Kallal (Access MVP)" <kallal@msn.com> - 2020-08-02 09:34 -0700
        Re: merging pdf files "Albert Kallal (Access MVP)" <kallal@msn.com> - 2020-08-02 13:37 -0700
    Re: merging pdf files internet.shopping@foobox.com - 2020-08-03 00:49 -0700
      Re: merging pdf files Ron Paii <ron81pai@gmail.com> - 2020-08-03 06:55 -0700
        Re: merging pdf files Ron Paii <ron81pai@gmail.com> - 2020-08-03 08:02 -0700
          Re: merging pdf files "Albert Kallal (Access MVP)" <kallal@msn.com> - 2020-08-03 09:28 -0700
            Re: merging pdf files Ron Paii <ron81pai@gmail.com> - 2020-08-03 12:18 -0700
              Re: merging pdf files "Albert Kallal (Access MVP)" <kallal@msn.com> - 2020-08-03 12:59 -0700
                Re: merging pdf files Ron Paii <ron81pai@gmail.com> - 2020-08-04 05:28 -0700
                Re: merging pdf files internet.shopping@foobox.com - 2020-08-04 08:48 -0700
                Re: merging pdf files "Albert Kallal (Access MVP)" <kallal@msn.com> - 2020-08-05 10:18 -0700
                Re: merging pdf files lucteunis1@gmail.com - 2021-02-10 12:01 -0800
                Re: merging pdf files "Albert Kallal (Access MVP)" <kallal@msn.com> - 2021-02-11 15:04 -0800
                Re: merging pdf files Keith Tizzard <internet.shopping@foobox.com> - 2021-06-24 08:44 -0700
    Re: merging pdf files musicloverlch <lhowey@gmail.com> - 2021-08-24 09:37 -0700
      Re: merging pdf files Keith Tizzard <internet.shopping@foobox.com> - 2021-08-24 10:42 -0700
        Re: merging pdf files musicloverlch <lhowey@gmail.com> - 2021-08-25 09:23 -0700
          Re: merging pdf files Keith Tizzard <internet.shopping@foobox.com> - 2021-08-25 09:39 -0700
            Re: merging pdf files musicloverlch <lhowey@gmail.com> - 2021-09-10 07:20 -0700
              Re: merging pdf files "Albert Kallal (Access MVP)" <kallal@msn.com> - 2021-11-11 11:09 -0800
                Re: merging pdf files Extreme Estabrooks <jestabrook@winningsolutionsinc.com> - 2021-12-29 08:03 -0800
                Re: merging pdf files Extreme Estabrooks <jestabrook@winningsolutionsinc.com> - 2021-12-29 08:04 -0800
                Re: merging pdf files ANKIT ROY <ankit.aryson@gmail.com> - 2022-03-02 22:47 -0800

csiph-web