Print Page | Close Window

Image in PDF, OK in PDF Reader - not OK printing

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=3266
Printed Date: 28 Sep 24 at 11:00PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Image in PDF, OK in PDF Reader - not OK printing
Posted By: hishaps
Subject: Image in PDF, OK in PDF Reader - not OK printing
Date Posted: 15 Feb 16 at 2:05PM
Hi guys at DebuEnu.

First of all thanks for a great product, I have used it for a long time and it is rock solid!

In the meantime, I have ran into a problem when printing a PDF that I can't find any solution to fix. The problem exists in version 9, but also in 12.12 which I have tried. 

I have a Word document which have a header image in the upper corner. When I save this document, and open it, everything looks smooth. However if I take this file and print it thru

the PrintDocument function

then this header image looks like it is repeating/looping and not centered anymore - What is wrong here when everthing looks fine in the Reader?

What do to here? - Please help!

Best,
Hisse



Replies:
Posted By: Ingo
Date Posted: 15 Feb 16 at 3:44PM
Hi Hisse,

i would try "CombineContentStream" and "NormalizePage" before printing.
Perhaps this will help already.

Cheers and welcome here,
Ingo






-------------
Cheers,
Ingo



Posted By: hishaps
Date Posted: 16 Feb 16 at 8:28AM
Hi Ingo

Thank you for your quick reply. Much appreciated. I tried all possible combination with NormalizePage 0 - 3 and with/without CombineContentStream, however the result is still the same :(

Is there any other approach I could do?


All the best,
Hisse


Posted By: Ingo
Date Posted: 16 Feb 16 at 1:36PM
you should upload the doc anywhere and post the link here.
So other users here can try getting a better result ;-)



-------------
Cheers,
Ingo



Posted By: hishaps
Date Posted: 16 Feb 16 at 2:05PM
Hi Ingo.

Thats a great idea. I have uploaded the file to this location:

http://www.filedropper.com/repeatingimageafterprinting-copy

Let me hear if there is any trouble retrieving it.

Best.
Hassi


Posted By: hishaps
Date Posted: 16 Feb 16 at 2:09PM
The file is then exported to PDF thru Word and then printed with the DebEnu libary. File looks fine in Reader afterwards.


Posted By: Ingo
Date Posted: 16 Feb 16 at 8:54PM
Hi,

for me it's okay.
I've saved the docx to pdf.
Then i print it via Foxit...
then i print it via a commandline-tool i've made with QuickPDF 10.12.

The printout is always the same.
The cat is on the top right as expected.



-------------
Cheers,
Ingo



Posted By: hishaps
Date Posted: 17 Feb 16 at 8:25AM
Hi Ingo.

That is very interresting! Can you share the few lines of code you use to set up the pdf printing functionality in The DebEnu SDK?

Thanks!

Hiise


Posted By: Ingo
Date Posted: 17 Feb 16 at 10:10PM
Hi Hiise,

i don't know if it helps undocumented.
It's from a complete printer module which can use bins and few additional options...
If there are questions please go to the online reference and read about the functions.
This source was made with D2007 - so an utf-conversion was necessary...

   QP := TDebenuPDFLibrary1012.Create;
   try
      QP.UnlockKey('...');
      nokays := QP.LoadFromFile(Pchar( AnsiToUtf8(fname)),'' );
      if ( nokays = 0 ) then
         begin
            lec := QP.LastErrorCode;
// ...      if ( lec = ... ) Then

// ...
         
         end;
      
         If QP.EncryptionStatus > 0 Then
            QP.Decrypt;

         if ( prname = 'default') Then
            PriName := QP.GetDefaultPrinterName;

         if (prname <> 'default' ) then
            PriName := prname;

         pc := QP.PageCount;

// ...

         propt := QP.PrintOptions(pscal, rotate, fname);
             
         if ( bin > 0 ) Then
            begin
               cPriName := QP.NewCustomPrinter(PriName);
               QP.SetupCustomPrinter(cPriName, 9, bin);
            end; 
             
         if ( pend = 9999 ) then
            pend := pc;
         for i := 1 to copies do
            begin
               if ( bin > 0 ) Then
                  QP.PrintDocument(cPriName, pstart, pend, propt)
                 else 
                  QP.PrintDocument(PriName, pstart, pend, propt);
            end;
   finally
       QP.Free;
       ErrorAddr := Addr(err);
       ExitCode := 0001;
   end;



-------------
Cheers,
Ingo



Posted By: hishaps
Date Posted: 02 Mar 16 at 8:52PM
Fantastic - I got this to work. Thanks a lot Ingo!

Best regards




Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk