Printing via C1PdfDocumentSource gives prints only half first row (attachment)

Posted by: kristoffer.kajler on 11 December 2017, 2:30 am EST

    • Post Options:
    • Link

    Posted 11 December 2017, 2:30 am EST

    We Have an issue with printing a reporting services report via C1PdfDocumentSource (WPF) with a margin of Top 0cm and left margin 1cm. You would see the result I get in attacment1RSRapport.jpg. And a part of our code in the other attachment.

    The problem seems to be that the page has an “unvissible border” that makes half of the first row disappear.

    we want to avoid to set a margin on the report itself because that the report is beeing printing from other codes as well (via System.Drawing.Printing.PrintDocument).

    I have tried to set margins via TopMargin-Property;

    pds.PageSettings.TopMargin = New Unit(2.4, UnitTypeEnum.Cm)

    I Have tried to set PageBorderless at the printerticket

    Neihter does any effect.

    Can I affect the margin on the printed result by code in some way Without changing the margin on the report?

    Kind Regards

    Kristoffer Kajler

    Pengvin Affärssystem AB

  • Posted 11 December 2017, 11:25 pm EST

    Hello Kristoffer,

    We do not see any attachments with your query,so could you please reattach the files.

    Thanks,

    Ruchir Agarwal

  • Posted 12 December 2017, 2:12 am EST

    I send the attachment again in zip. I have also made a sampleproject in wpf/vb.net

    PVPrintSample.zip

  • Posted 13 December 2017, 7:54 am EST

    Hello Kristoffer,

    Thank you for the attachments.

    Did you try printing the report (using C1PdfDocumentSource) with any printer other than the one you are facing the issue. We are asking this since using the application you shared, we could not observe any trimming of first row. Please refer attached *.xps file generated at our end. Therefore, we suspect that it might a printer setting related issue.

    Thanks,

    Ruchir AgarwalXPS_file.zip

  • Posted 14 December 2017, 6:53 pm EST

    I am sorry to say that but I have tested the printing on four different physical printers (Konica Minolta, BROTHER DCP-7010, HP Laserjet P2055 and Cannon C600i) With the same result on the HP and canon printer it even get worse.

    But If I use FilePrinters like “Microsoft Print to PDF” and “Microsoft XPS Document Writer”

    I get the same result as you. But that does not help me when all physical printers did not get the expected result.

    Once again I ask you if there is a way by code affect the margins on the printed result.

    As I mentioned earlier I have tried a way that locical should do what I want

       pds.PageSettings.TopMargin = New Unit(20, UnitTypeEnum.Mm)
        pds.PageSettings.LeftMargin = New Unit(20, UnitTypeEnum.Mm)
    

    Kind Regards

    Kristoffer

  • Posted 18 December 2017, 4:07 pm EST

    Hello Kristoffer,

    Printing the document using physical printers, we too could observe the same at our end. Also, setting the PageMargins does not seem to make a difference. Hence the issue has been raised and the concerned team has been informed {Tracking ID: 301482}.

    We will update you once it is fixed or when we receive some information from them.

    Regards,

    Ruchir Agarwal

  • Posted 21 December 2017, 2:55 pm EST

    Hello Kristoffer,

    We have received response from developer and it is currently a limitation in control: If document’s margins are smaller than printable margins then document’s content will be truncated.

    We regret the inconvenience caused due to this issue.

    Thanks,

    Ruchir Agarwal

  • Posted 4 January 2018, 7:15 pm EST

    Will this limitation be fixed?

    Did not get any answer on my other question - that the margin not will be affected by code via PageSettings?

    Why are there properties like PageSettings.LeftMargin when the use of them does not take any affect? We see this as a bug, do you? and will it be fixed soon?

    The best way for us should be to use these properties when this bug has been corrected.

    If not we have two choices, which both are very time consuming:

    1. Find an other solution to print Reporting Services report.
    2. to change all our existing reports (about 100 reports)

    I find the control (C1PdfDocumentSource) very useful in other aspctes. And It was a shame if we have to again look arount for other solutions.

    Kind Regards

    Kristoffer

  • Posted 5 January 2018, 1:46 am EST

    Hello Kristoffer,

    Changing C1PdfDocumentSource.PageSettings does not make any effect in case of C1PDFDocumentSource’ because using C1PdfDocumentSource, document can not re-flow as PDF format does not support this. PDF Documents have already been generated for some page layout including page size, margins etc and it cannot be changed, this is specific to PDF format.

    Also, PageSettings property defined in the C1DocumentSource class, which is a base class for other viewing solutions too like C1FlexReport, C1SSRSDocumentSource where changing of PageSettings causes re-flowing of the report at the time of generation. But with C1PdfDocumentSource we cannot re-flow the document because PDF format does not support this. Hence, we think that PageSettings property in case of C1PdfDocumentSource should be read-only, this will be fixed in next version.

    For now, there is no work around available.

    However, as this is critical for you I am checking with the concerned team if there is anything that can be done in the product .

    Sorry for the inconvenience caused.

    Thanks,

    Ruchir Agarwal

  • Posted 5 January 2018, 5:10 pm EST

    Hello Kristoffer,

    We are glad to inform you that the concerned team has reviewed this limitation and now, they will be modifying the control to tackle this issue.

    Thanks,

    Ruchir Agarwal

  • Posted 22 January 2018, 6:15 pm EST

    Hi Kristoffer,

    We are happy to let you know, that the document is now printed correctly setting printOptions.PageScaling = PageScaling.FitToPrintableArea. The changes have made in an internal build, I will update you once they are released public.

    Thanks,

    Ruchir Agarwal

  • Posted 14 March 2018, 10:01 pm EST

    We are sorry to say that we found an other issue with C1PdfDocumentSource.

    When we printed labels with barcode on 203 dpi label printers we got an unacceptable result on the barcode (see attached picture) which we did not receive when printing via System.Drawing.Printing.PrintDocument that we are using in other components we made.

    This issue forced us unfortunatley to stop using C1PdfDocumentSource.

  • Posted 15 March 2018, 8:43 pm EST

    Hello Kristoffer,

    We understand that the output observed for Barcode is unacceptable and hence we have escalated it to fix this issue as soon as possible {ID: 313809}. However, to get the issue fixed quickly could you please share following details with us:

    1. The Barcode type you are using.
    2. Is the issue occurring with other printers too?

      Also, we are assuming that you are on the latest version of ComponentOne builds-4.0.20181.587. If that’s not the case, we request you to please upgrade to latest version and test the issue with it. You may either use C1Live(C:\Program Files (x86)\ComponentOne\C1Live) or the following URL to upgrade: http://prerelease.componentone.com/dotnet40/c1wpflibrary/2018-t1/C1WPFBasicLibrary.4_4.0.20181.587.zip

      It would really help us, if you could you share a sample replicating the issue.

    Regards,

    Ruchir Agarwal

  • Posted 15 May 2018, 10:30 pm EST

    Hello Kristoffer,

    To investigate further on this issue, could you please share a demo application demonstrating the issue.

    Thanks,

    Ruchir

  • Posted 19 June 2018, 10:18 pm EST

    Hey,

    I am sorry to say that we have decided to leave this component behind. We are now using Microsoft.Reporting for rendering reports and printing via System.Drawing.Printing.PrintDocument in our WPF-application like our other products.

    The major reason we are not intressting in C1PdfDocumentSource anymore is “the tight margins” (compared with rendering via Microsoft.Reporting the margin cut of approx 4 mm in both top and left margin).

    Earlier this year we decided not to change all our reports margins it had been a too large issue for our customers. I have also tested another component which does not have these tight margins (PdfPrintingNet) So the label thing is not the only reason for our choice.

    Anyway I send you a sample application if you want to look att the case with poor labelprinting for other users.

    PVPrintSample.zip

  • Posted 20 June 2018, 10:59 pm EST

    Hello,

    We regret that we could not fulfill your requirements and that you have to migrate to another control. However, thank you for sharing the sample, we will conduct investigation at our end using the same and try to resolve it asap.

    Hopefully we’ll make changes in our control and we will be glad if we get a chance to help you in future.

    Kind Regards,

    Ruchir

  • Posted 26 June 2018, 6:34 pm EST

    I am sorry to mention that the conclusion of the investigation is, it’s a limitation in control, which is because a small barcode image is scaled up to a bigger size, and then printed on a printer will low resolution.

    Apologies for the inconvenience caused due to this.

    ~Ruchir

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels