Appended PageElement to MergeDocument missing

Appended PageElement to MergeDocument missing

Forum member · Aug 14, 2012
I generated a MergeDocument using the following code: TiffFile tiffFile = new TiffFile(filepath); Document tifDoc = tiffFile.GetDocument(); byte[] pdfData = tifDoc.Draw(); PdfDocument pdfDoc = new PdfDocument(pdfData); doc = new MergeDocument(pdfDoc); Later I append a barcode to this MergeDocument. Page firstPage = doc.Pages[0]; Interleaved25 barCode = new Interleaved25(barcodeValue, 0, 0, 50); When I save this doc as a PDF by doc.Draw(fileName); the output pdf contains only the imported Tiff-file but the appended barcode is missing. When I import an existing PDF- file by pdfDoc = new PdfDocument(filePath); and then append the barcode, everything is fine and the barcode is visible in the output pdf. What is the reason for this problem?

Re: Appended PageElement to MergeDocument missing

Support · Aug 14, 2012
Hello, We did some testing on our end and we are able to generate PDF document out of Tiff image on the fly and successfully added barcode to the specified page in the PDF. Please send over the below details to our [^a|mailto:support@cete.com|opennewwindow|support^] team so that they can look into it further. 1. Input Tiff image. 2. Output PDF document. 3. Exact version and build number of the DynamicPDF dll file which you are using. Thanks, ceTe Software Support Team.

Re: Appended PageElement to MergeDocument missing

Forum member · Aug 14, 2012
Hello Support-Team, thanks for your quick reply. I’m not allowed to send you the imported TIFs, because they are confidential documents from my customer. But when I examined the output PDF again, I noticed that the appended barcode was visible indeed (sorry ;-) but it was very small at another position as expected. When I imported a PDF the barcode was placed at the Top- and Left-values I selected. Using the same values (Top: 200, Left: 450 i.e. in the upper right corner) for an imported TIF, the barcode is placed at the upper left corner. The TIF-image has a size of 2480 x 3507 pixels and a resolution of 300 dpi. How am I to adjust my code, to get the barcode placed at the richt position? Thanks for you very good support!

Re: Appended PageElement to MergeDocument missing

Support · Aug 14, 2012
Hello, You can add the barcode at desired location by setting x and y positions using X and Y properties of the Interleaved25 class. You can also set the height using Height property. You can control the dimensions of the barcode by setting XDimension value to it. Please refer documentation on Interleaved25 barcode here . Also refer documentation on members of Interleaved25 barcode here . Thanks, ceTe Software Support Team.

Re: Appended PageElement to MergeDocument missing

Forum member · Aug 15, 2012
Hello Support-Team, I fixed the problem. I had to scale the imported TIF-images due to their resolution when appending them to the PdfPage. Thanks again for your help.