Showing posts with label method. Show all posts
Showing posts with label method. Show all posts

Wednesday, March 28, 2012

PDF Not begin handled by FireFox

When I use the Webservice Render method for a PDF, the PDF shows perfectly
in IE but in FireFox it dumps the text of the pdf instead of rendering it...
Any ideas?
Tim Philomeno
tphilomeno@.sparling.comWhat does your FireFox do when you open other PDFs?
--
Floyd
"Tim Philomeno" <tphilomeno@.sparling.com> wrote in message
news:OvsscidnFHA.2472@.tk2msftngp13.phx.gbl...
> When I use the Webservice Render method for a PDF, the PDF shows perfectly
> in IE but in FireFox it dumps the text of the pdf instead of rendering
> it...
> Any ideas?
> Tim Philomeno
> tphilomeno@.sparling.com
>|||If I open a PDF from a local drive or the internet, it works perfectly...
Tim
"Floyd Burger" <mrlements@.community.nospam> wrote in message
news:%23exPxUenFHA.708@.TK2MSFTNGP09.phx.gbl...
> What does your FireFox do when you open other PDFs?
> --
> Floyd
> "Tim Philomeno" <tphilomeno@.sparling.com> wrote in message
> news:OvsscidnFHA.2472@.tk2msftngp13.phx.gbl...
>> When I use the Webservice Render method for a PDF, the PDF shows
>> perfectly in IE but in FireFox it dumps the text of the pdf instead of
>> rendering it...
>> Any ideas?
>> Tim Philomeno
>> tphilomeno@.sparling.com
>|||It could be that FireFox is observing the file extension to determine that
it needs to pass the file to Acrobat vs. the mime type.
"Tim Philomeno" <tphilomeno@.sparling.com> wrote in message
news:OvsscidnFHA.2472@.tk2msftngp13.phx.gbl...
> When I use the Webservice Render method for a PDF, the PDF shows perfectly
> in IE but in FireFox it dumps the text of the pdf instead of rendering
it...
> Any ideas?
> Tim Philomeno
> tphilomeno@.sparling.com
>sql

Friday, March 23, 2012

PDF and new line

Here is a very funny problem and I searched, tried every method and cannot
figure this out.
Problem: If my field has carriage returns at the start and then some text
and then again carriage return, the HTML shows fine but when exported to PDF
start Carriage returns are not displayed.
Example:
Database value:
3 carriage return and this is text.
2 Carriege return and this is final text
HTML shows:
3 carriage return and this is text.
2 Carriege return and this is final text
PDF shows:
3 carriage return and this is text.
2 Carriege return and this is final text
NO INITAL carriage return in PDF but it does leave once there is some text.
Is this the rendering problem or a bug'
Note: I am not using RTRIM or TRIM anywhere.please help....
I need this resolved for today's build.
thanks,
Rahul
"RK" wrote:
> Here is a very funny problem and I searched, tried every method and cannot
> figure this out.
> Problem: If my field has carriage returns at the start and then some text
> and then again carriage return, the HTML shows fine but when exported to PDF
> start Carriage returns are not displayed.
> Example:
> Database value:
>
> 3 carriage return and this is text.
> 2 Carriege return and this is final text
>
> HTML shows:
>
> 3 carriage return and this is text.
> 2 Carriege return and this is final text
>
> PDF shows:
> 3 carriage return and this is text.
> 2 Carriege return and this is final text
>
> NO INITAL carriage return in PDF but it does leave once there is some text.
> Is this the rendering problem or a bug'
> Note: I am not using RTRIM or TRIM anywhere.|||I found it.
Replace(string, CHAR(13), CHAR(0)
PDF considers char(0), NULL ad adds a carriage return.
"RK" wrote:
> please help....
> I need this resolved for today's build.
> thanks,
> Rahul
> "RK" wrote:
> > Here is a very funny problem and I searched, tried every method and cannot
> > figure this out.
> >
> > Problem: If my field has carriage returns at the start and then some text
> > and then again carriage return, the HTML shows fine but when exported to PDF
> > start Carriage returns are not displayed.
> >
> > Example:
> >
> > Database value:
> >
> >
> >
> > 3 carriage return and this is text.
> >
> > 2 Carriege return and this is final text
> >
> >
> >
> > HTML shows:
> >
> >
> >
> > 3 carriage return and this is text.
> >
> > 2 Carriege return and this is final text
> >
> >
> > PDF shows:
> > 3 carriage return and this is text.
> >
> > 2 Carriege return and this is final text
> >
> >
> > NO INITAL carriage return in PDF but it does leave once there is some text.
> > Is this the rendering problem or a bug'
> >
> > Note: I am not using RTRIM or TRIM anywhere.sql

PDF and attribute

I have reporting service 2005 report, Through Render method, populating PDF
file. Is there anyway, we can set PDF attrubute file to prevent user to
modify?
with Readyonly attribute, user can change the property of a file?
any othereway, we can make PDF can not be modifed using Editor?
in short, make the PDF readyonly.On Dec 10, 2:20 pm, Kalyan <Kal...@.discussions.microsoft.com> wrote:
> I have reporting service 2005 report, Through Render method, populating PDF
> file. Is there anyway, we can set PDF attrubute file to prevent user to
> modify?
> with Readyonly attribute, user can change the property of a file?
> any othereway, we can make PDF can not be modifed using Editor?
> in short, make the PDF readyonly.
Normally, if a user has a PDF creator software, it is hard to keep
them from modifying the PDF file; however, to set the attributes to
read only, you could try something like this in a custom ASP.NET
application.
http://www.java2s.com/Tutorial/VB/0240__Stream-File/SetfileattributesHiddenReadOnly.htm
Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant

Monday, February 20, 2012

Passing second column of table as index

We are working on C++ in eVC++ 3.0 environment (CE 3.0) with SQL CE 2.0.

We are trying with IRowsetIndex:: Seek method to access the data from the database.

We are facing problem when we try to access data from the table having composite index other than the first column.

For example:
The table ITEM contains the following columns:
1. ItemCode
2. PcNo
3. SubPcNo
4. BrandNo
5. DescText

6. ProductionKind

7. ProductionState

8. ClearingState

9. ST

10. TS

I’ve two indexes for this table where the two indexes are

1. ItemKey1 on ITEM (ItemCode).

2. ItemKey2 on ITEM (PcNo, SubPcNo, BrandNo).

If I mention ItemKey1 as the index then the Seek method works perfectly.

But if I mention ItemKey2 as the index, then I’m getting the error as “DB_E_BADBINDINFO”.

When we visted the MSDN for this problem we noted that:

1. When you use the Seek method on multiple fields, the Seek fields must be in the same order as the fields in the underlying table. If they are not, the Seek method fails.

2. When passing key values to an index rowset, the consumer performs these actions only for the number of key columns specified in the cKeyValues argument in IRowsetIndex:: Seek.

So we had the composite index such that columns of a composite index are physically aligned next to each other as in the table.

When the first column of the index is the first column of the table as in index ItemKey1 we found that the seek method works perfectly.

If we pass the index ItemKey2, we are again getting the error “DB_E_BADBINDINFO”.

What else have we missed out while passing the keys in IRowsetIndex:: Seek?

Thanks in advance.

Regards,

Sasi.

I saw this error when tried to use the table accessor for seeking. When you use IRowsetIndex you must create a separate accessor for the index columns and use that accessor for the Seek method, not the table's own accessor.

|||

Thanks for your reply Joao Paulo Figueira.

I was not able to understand the solution you provided, could you kinldy explain in detail.

Thanks & Regards,

Sasi.

|||

You must create a second memory buffer where to store the values to seek. This is built the same way as the memory buffer for accessing table data, but it must have the index columns and in the same order. You should use code similar to the one for binding the table columns in order to create the index accessor.

The only situation when you can share the same accessor between the table and the index is when the first N columns of the index are the same as the first N columns of the table. In all other situations you must create a different accessor for entering the data to seek.

|||

Thanks a lot Sir.

Its working now.

Thanks & Regards,

Sasi.