pdf-files too big (Win7)

The Amyuni PDF Converter is our Printer Driver that enables you to convert any documents to PDF format. If you have any questions about installing and using the Amyuni PDF Converter please post them here.
Post Reply
hackl
Posts: 6
Joined: Mon Aug 30 2010

pdf-files too big (Win7)

Post by hackl »

Hello @ll,

we use the activex interface of Version 4.5.2.9 to generate pdf-files on winxp (32bit) and win7 (64bit) machines.
But the generated pdf-files on win7 machines are approx. 3 times as big as pdf-files generated on winxp machines!

There is no difference inside our sourcecode between these two operating systems.
Our pdf-files are very simple, without images, only text, one watermark and 128encrypted.
The Evaluation Version 5.0.0.1 was also tested and have the same behavior.

We create thousands of pdf-files every day and had to store them on a server. This bigger pdf-files are a great problem for us!
What is responsible for this problem? I don't belive that the os-architecture (32bit/64bit) is responsible.
please help.

greetings
Georg
DanJa512
Posts: 3
Joined: Wed Oct 16 2013

Re: pdf-files too big (Win7)

Post by DanJa512 »

I am experiencing the same.

We are using the DLL interface, Amyuni PDF Converter 4.5.2.9. If a document has an image, each image seems to be duplicated across multiple pages when converted using x64 drivers.

i.e. I convert using an application on 32-bit, 4 page document creates a 63kb file. Same application same document on x64 creates a 196kb file. Printing a single-page report on both systems gives the same file size.

I have checked the default parameters for the printers on each system using DEVMODE. Jpeg/Flat compression is the same on both systems. I am guessing the original poster above is experiencing this due to the watermark, because it is an added image when PDF is converted.
DanJa512
Posts: 3
Joined: Wed Oct 16 2013

Re: pdf-files too big (Win7)

Post by DanJa512 »

It would be very helpful to know if this is a bug, or if there is something we can do differently to solve this issue.
Jose
Amyuni Team
Posts: 553
Joined: Tue Oct 01 2002
Contact:

Re: pdf-files too big (Win7)

Post by Jose »

Hello,

Can you try adding the “Remove Duplicate Images“value to the ImageOptions property?

The link below provides more information about this property.
http://www.amyuni.com/WebHelp/Amyuni_Do ... ptions.htm

Thanks
Get PDF Suite, the expert .NET developer toolkit for PDF conversion, creation and editing - www.amyuni.com/pdfsuite
DanJa512
Posts: 3
Joined: Wed Oct 16 2013

Re: pdf-files too big (Win7)

Post by DanJa512 »

That worked -- thank you very much!
hackl
Posts: 6
Joined: Mon Aug 30 2010

Re: pdf-files too big (Win7)

Post by hackl »

Hello @ll
Can you try adding the “Remove Duplicate Images“value to the ImageOptions property?
This didn't work for me!
DanJa512 wrote:...I am guessing the original poster above is experiencing this due to the watermark, because it is an added image when PDF is converted.
Yes, you're right. It has something to do with the watermark in my files. If I leave the watermark empty, the pdf-files were createt with "original" file-size.
But when I'am using the watermark the file-size is 3time as big as without. With each letter in the watermark the pdf-filesize increase enormously.
This only occur on win7 and not on winxp!

Well, using ImageOptions with Remove Duplicate Images (0x00000001) didn't solve the problem!! There is no difference.

Any further suggestions?

greetings
georg
Jose
Amyuni Team
Posts: 553
Joined: Tue Oct 01 2002
Contact:

Re: pdf-files too big (Win7)

Post by Jose »

Hello,

Unfortunately I am not totally following your issue. Can you post a code snippet of how you are adding the watermark?

thanks
Get PDF Suite, the expert .NET developer toolkit for PDF conversion, creation and editing - www.amyuni.com/pdfsuite
hackl
Posts: 6
Joined: Mon Aug 30 2010

Re: pdf-files too big (Win7)

Post by hackl »

Jose wrote:Hello,

Unfortunately I am not totally following your issue. Can you post a code snippet of how you are adding the watermark?

thanks
Hello Jose,

following you'll find some soucecode. First, we have that Problem with ActiveX and usind dll and second, I was lying because we had still one difference between using winxp and win7. The printed watermark unter win7 isn't at the same position like under winxp.

--> DLL

Code: Select all

   IF (lOK := (::hDriver := DllCall(::nAMDLL, DLL_STDCALL, 'PDFDriverInit', PDF_CONVERTERNAME)) > 0)
      DllCall(::nAMDLL, DLL_STDCALL, 'SetEncryption',      ::hDriver, 2 )
      #ifdef AM_PWUSER
         DllCall(::nAMDLL, DLL_STDCALL, 'SetUserPassword',    ::hDriver, AM_PWUSER )
      #endif
      DllCall(::nAMDLL, DLL_STDCALL, 'SetOwnerPassword',   ::hDriver, AM_PWOWNER )
      DllCall(::nAMDLL, DLL_STDCALL, 'SetPermissions',     ::hDriver, AM_PM_PRINTING )

      DllCall(::nAMDLL, DLL_STDCALL, 'SetFileNameOptions', ::hDriver, AM_FO_DEFAULT )
      DllCall(::nAMDLL, DLL_STDCALL, 'SetDefaultFileName', ::hDriver, cDocFilename )
      DllCall(::nAMDLL, DLL_STDCALL, 'SetFontEmbedding',   ::hDriver, 0 )

         IF Os(OS_PRODUCT) == "WIN2K" .OR. Os(OS_PRODUCT) == "WINXP"
            DllCall(::nAMDLL, DLL_STDCALL, 'SetWatermark',       ::hDriver, ConvToAnsiCP(::Owner:cPDFWaterMark), "Arial BOLD", 12, 2700, 0x00FFBFAF, 8, -1035, .F. )
         ELSE // Os(OS_PRODUCT) == "WIN7"
            // fr alle neueren Bestriebssysteme
            DllCall(::nAMDLL, DLL_STDCALL, 'SetWatermark',       ::hDriver, ConvToAnsiCP(::Owner:cPDFWaterMark), "Arial BOLD", 8, 2700, 0x00FFBFAF, 48, -1035, .F. )
         ENDIF
      DllCall(::nAMDLL, DLL_STDCALL, 'EnablePrinter',      ::hDriver, @cLicense, @cActivation)
--> ActiveX

Code: Select all

   IF ::ActiveXObject:DriverInit(PDF_CONVERTERNAME) == 0
      ::ActiveXObject:Encryption := 2
      #ifdef AM_PWUSER
         ::ActiveXObject:UserPassword := AM_PWUSER
      #endif
      ::ActiveXObject:OwnerPassword := AM_PWOWNER
      ::ActiveXObject:Permissions   := AM_PM_PRINTING
      ::ActiveXObject:DefaultFilename := cDocFilename
      ::ActiveXObject:FontEmbedding := .F.
      ::ActiveXObject:FilenameOptions  := AM_FO_DEFAULT

         IF Os(OS_PRODUCT) == "WIN2K" .OR. Os(OS_PRODUCT) == "WINXP"
            ::ActiveXObject:SetWatermark( ::Owner:cPDFWaterMark, "Arial BOLD", 12, 2700, 0x00FFBFAF, 8, -1035, 0 )   // Wasserzeichen definieren
         ELSE // Os(OS_PRODUCT) == "WIN7"
            // fr alle neueren Bestriebssysteme
            ::ActiveXObject:SetWatermark( ::Owner:cPDFWaterMark, "Arial BOLD", 8, 2700, 0x00FFBFAF, 48, -1035, 0 )   // Wasserzeichen definieren
         ENDIF
      ::ActiveXObject:EnablePrinter(cLicense, cActivation)
AM_FO_DEFAULT is 0x00000001 + 0x00000002 + 0x00000040 + 0x40000000 (NoPrompt + UseFilename + PrintWatermark + EncryptDocument128)
AM_PM_PRINTING is 0 + 4 (PRINTING)

Hope you can help me,
Georg
hackl
Posts: 6
Joined: Mon Aug 30 2010

Re: pdf-files too big (Win7)

Post by hackl »

Helo Jose,

I posted my sourcecode a couple of weeks ago, mid-October! :?
Let me know, if you need some more information.

But at the end of the year i need some information what is wrong?

greetings
Georg
Post Reply